Hi,
The anchor needs to be display:block but if you want it full width then you need the padding on the anchor and not on the list because that will make the anchor narrower.
Code:
#submenu ul {
width:100px
}
#submenu li {
list-style:none;
margin-bottom:10px;
background:#ffc666;
}
#submenu a {
color:white;
padding:0 4px;
display:block;
width:92px;/* ie6 needs haslayout or won't hover over the whole block*/
}
#submenu a:hover {
background:#fcfb54;
}
#submenu a.current {
background:#666;
}
If you want subnavigation then you would nest another ul and then use some javascript to hide and show it when clicked.
Code:
<ul>
<li><a class="current" href="test.html">Home</a></li>
<li><a href="">About</a>
<ul>
<li><a href="#">Sub navigation</a></li>
<li><a href="#">Sub navigation</a></li>
<li><a href="#">Sub navigation</a></li>
<li><a href="#">Sub navigation</a></li>
</ul>
</li>
<li><a href="">Contact</a></li>
<li><a href="">Link to Us</a></li>
</ul>
Here's a very basic example but there are some much better ones around. If you can't manage it yourself then there are plenty of jquery menus around that will do the same.
Bookmarks