所以我用div製作了這個頂級菜單,因爲這傢伙想要盒子,並且希望它們的尺寸完全相同,而不管文字是什麼。它看起來很好,但不會激活財產或懸停。請幫忙。我的<a>不工作,也不是懸停屬性
的CSS是
.headerbottomcontainer {
width: 100%;
max-width: 980px;
margin-left: auto;
margin-right: auto;
min-height: 78px;
border: 1px dotted #27c3ed;
}
.headerbottomleft {
width: 290px;
float: left;
padding-left: 5px;
padding-right: 5px;
border: 1px dotted #F36;
min-height: 66px;
}
.headerbottomright {
width: 640px;
margin-left: 15px;
min-height: 66px;
float: left;
border: 1px dotted #27c3ed;
}
.headerbottomrighttop {
height: 28px; /*Change to 30 when remove borders*/
width: 100%;
border: 1px dotted #093;
}
.headerbottomrightbottom {
height: 28px; /*Change to 30 when remove borders*/
width: 100%;
margin-top: 10px;
border: 1px dotted #C60;
}
.navbuttonfirst {
width: 122px;
height: 16px; /*Change to 30 when remove borders*/
font-size: 16px;
color: #fff;
border: 1px solid #f00;
float: left;
text-align: center;
padding-top: 5px;
padding-bottom: 7px;
border-radius: 3px;
}
.navbutton {
margin-left: 5px;
width: 122px;
height: 16px; /*Change to 30 when remove borders*/
font-size: 16px;
color: #fff;
border: 1px solid #f00;
float: left;
text-align: center;
padding-top: 5px;
padding-bottom: 7px;
border-radius: 3px;
}
.navbutton:hover{
background-color:#f00;
}
而HTML是
<div class="headerbottomcontainer">
<div class="headerbottomleft">
</div>
<div class="headerbottomright">
<div class="headerbottomrighttop">
<div class="navbuttonfirst">
<a href="http://www.jetnightclub.com/events.html">Events</a>
</div>
<div class="navbutton">
<a href="photos.html">Photos</a>
</div>
<div class="navbutton">
<a href="videos.html">Videos</a>
</div>
<div class="navbutton">
<a href="ourclub.html">Club Info</a>
</div>
<div class="navbutton">
<a href="contact.html">Contact</a>
</div>
</div>
<div class="headerbottomrightbottom">
<div class="navbuttonfirst">
<a href="birthdays.html">Birthdays</a>
</div>
<div class="navbutton">
<a href="barhop.html">Bar Hop</a>
</div>
<div class="navbutton">
<a href="newyears2013-2014.html">New Year's</a>
</div>
<div class="navbutton">
In the mix
</div>
<div class="navbutton">
Downloads
</div>
</div>
</div>
</div>
我沒有看到':hover'在你的CSS中的任何地方,爲此目的考慮使用'ul'和'li' e嵌套在'nav'下的遊戲庫 –
add:懸停在你的navbutton .navbutton:hover { \t background-color:#333333; \t顏色:#006633; } – Karuppiah
是的,我把徘徊出去,因爲它沒有工作對不起,將加回來.....仍然沒有工作....任何想法,爲什麼我的不工作/ – user3098121