Tutorial 2 - Simple CSS rollover lists

Step 3 - Remove padding and margins

Standard HTML lists have a certain amount of left-indentation. The amount varies on each browser. Some browsers use padding (Mozilla, Netscape, Safari) and others use margins (Internet Explorer, Opera) to set the amount of indentation.

To remove this left-indentation consistently across all browsers, set both padding and margins to "0" for the "UL".

Go to Step 4 →

#navcontainer ul
margin: 0;
padding: 0;

list-style-type: none;

<div id="navcontainer">
<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>
Other Max Design articles and presentations
Associated with webstandardsgroup.org