Firefox似乎是唯一没有正确显示我的CSS标头的浏览器。它应该在它上面和下面都有一个海军蓝色边框,它可以在Chrome和IE中正确显示。我将CSS发布到横幅上。 Firefox正在将该元素显示为" div clear"当我检查它时。
这是我正在谈论的网页:http://www.lymemd.org
CSS:
@import url(http://fonts.googleapis.com/css?family=Open+Sans:700);
#cssmenu {
background: #8EBD0F;
width: auto;
}
#cssmenu ul {
list-style: none;
margin: 0;
padding: 0;
line-height: 1;
display: block;
zoom: 1;
}
#cssmenu ul:after {
content: ' ';
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}
#cssmenu ul li {
float: left;
display: block;
padding: 0;
}
#cssmenu ul li a {
color: #ffffff;
text-decoration: none;
display: block;
padding: 15px 25px;
font-family: 'Open Sans', sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
position: relative;
-webkit-transition: color .25s;
-moz-transition: color .25s;
-ms-transition: color .25s;
-o-transition: color .25s;
transition: color .25s;
}
#cssmenu ul li a:hover {
color: #333333;
}
#cssmenu ul li a:hover:before {
width: 100%;
}
#cssmenu ul li a:after {
content: '';
display: block;
position: absolute;
right: -3px;
top: 19px;
height: 6px;
width: 6px;
background: #ffffff;
opacity: .5;
}
#cssmenu ul li a:before {
content: '';
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 0;
background: #333333;
-webkit-transition: width .25s;
-moz-transition: width .25s;
-ms-transition: width .25s;
-o-transition: width .25s;
transition: width .25s;
}
#cssmenu ul li.last > a:after,
#cssmenu ul li:last-child > a:after {
display: none;
}
#cssmenu ul li.active a {
color: #333333;
}
#cssmenu ul li.active a:before {
width: 100%;
}
@media screen and (max-width: 768px) {
#cssmenu ul li {
float: none;
}
#cssmenu ul li a {
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu ul li a:after {
display: none;
}
#cssmenu ul li a:before {
height: 1px;
background: #ffffff;
width: 100%;
opacity: .2;
}
#cssmenu ul li.last > a:before,
#cssmenu ul li:last-child > a:before {
display: none;
}
}
答案 0 :(得分:0)
原来我只是错过了一个结束div标签 - 仅此而已。
答案 1 :(得分:-1)
我要做的是以下内容:
1)更改http://www.lymemd.org/images/headerbg.jpg图片,删除底部绿色边框
2)将第377行中stylenew1.css的#navArea样式更改为:
#navArea {
background: none repeat scroll 0 0 #8EBD0F;
border-bottom: medium solid #455268;
border-top: medium solid #455268;
height: 45px;
margin: 0;
width: 100%;
}
我希望它可以帮到你。祝你好运!