html - Blogger 中选定的页面选项卡背景溢出

标签 html css navbar blogger

我花了一些时间让我的导航栏在我的标题上方,并让它在我的博客宽度上展开 Boy Full of Books

但是,我有两个问题。主要问题在博客上很明显——所选选项卡的背景溢出到页面上,而不是与导航栏的其余部分保持一致。另一个问题不是我非常担心的问题,但如果有人有任何指导,那就太好了。缩小或放大时,导航栏中的页面选项卡不随页面大小调整。

下面是我的代码(不是很好,我知道,我还是个新手):

.PageList {  
text-align:center !important;  
width: 100%;  
}

.PageList ul {
margin-top: -42px;
margin-bottom: 0px;
margin-left: -20px;
background-color: #424242 !important;
width: 100%;
}

.PageList li {
display:inline !important; 
float:none !important;
font-size: 61.5px;
margin-left: 0px;
font-family: 'Verdana', Arial, sans-serif !important;
width: 100%;
}

.PageList a {
padding-left: 10px;
padding-right: 10px;
transition: background-color 0.5s ease;
color: #FFFFFF;
text-decoration: none !important;
width: 100%;
}

.PageList a:hover {
background-color: #aeadad;
width: 100%;
}

.PageList li.selected {
background-color: #aeadad !important;
text-decoration: none !important;
margin-bottom: -20px !important;
overflow: hidden;
}

最佳答案

1. 相反

.PageList li.selected{
  background-color: #aeadad !important;
  text-decoration: none !important;
  margin-bottom: -20px !important;
  overflow: hidden;
}

.PageList li.selected a {
  background-color: #aeadad !important;
  text-decoration: none !important;
  margin-bottom: -20px !important;
  overflow: hidden;
}
  1. 使用https://developer.mozilla.org/es/docs/CSS/Media_queries

关于html - Blogger 中选定的页面选项卡背景溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30624750/

相关文章:

css - 在响应式设计中同时使用 Canvas 外和固定导航栏

html - 为什么此菜单在 Firefox 3.5 和 IE7 中呈现效果不佳?我该如何适应?

javascript - 滚动后如何制作粘性页脚 "sink"?

html - 如何对齐div中的文本?

CSS 相对变化继承

javascript - 如何在网页上的光标上创建镜像效果?

html - 带搜索栏的 Bootstrap 可折叠导航栏 : form-inline does not scale well with resizing

twitter-bootstrap - 为什么不显示导航栏元素?

javascript - IE8 使用 JavaScript 加载和移动广告

javascript - 多个模态框 : no clue about javascript