How can I do the same background width into a list-menu? I tried applying “width:120px” but it doesn't work. Nowhere says auto-size. Please, need some help.
This is my css file:
Code:
body {
width:100%;
margin:0 auto;
}
a {
text-decoration:none;
font-family:"Verdana";
font-size:11px;
color:#fff;
}
#navcontainer ul {
margin:0;
padding:0;
list-style-type:none;
width:120px;
}
#navcontainer ul li {
display:block;
width:120px;
}
#navcontainer ul li a {
text-decoration:none;
padding: 0.25em 1em;
background-color:#999;
}
#navcontainer ul li a:hover {
background-color:#666;
}
And this is my html file:
div id="navcontainer">
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Home</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
Thank you!!!!!!!!
Last edited by tapi; 09-08-2009 at 11:09 AM..
|