Tutorial 3 - Nested 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><a href="#">Goat</a></li>
   <li><a href="#">Cow</a></li>
<li><a href="#">Eggs</a>
   <li><a href="#">Free-range</a></li>
   <li><a href="#">Other</a></li>
<li><a href="#">Cheese</a>
   <li><a href="#">Smelly</a></li>
   <li><a href="#">Extra smelly</a></li>
Other Max Design articles and presentations
Associated with webstandardsgroup.org