To add a background color, you set it within the "a" state. A color is also added to make the text readable.
CSS CODE
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
}
#navcontainer a
{
display: block;
color: #FFF;
background-color: #036;
}
HTML CODE
<div id="navcontainer">
<ul>
<li><a href="#">Milk</a></li>
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
</div>
Other Max Design articles and presentations