View Full Version : IE adding top margin/padding to nested list
I was hoping someone on a PC can help with this.
If you view this page here (http://www.mymascot.net/test/products/leads.html) - IE on PC throws some extra margin/padding to the nested navigation list. I've tried to zero out all margins/padding on it but to no avail. Can anyone help?
liamegan
09.10.06, 02:33 PM
Instead of haviing your submenu in an li element of it's own, you should put it in the li element of it's menu parent. so in your code you have;
<ul id="mainNavList">
<li class="arrow">Products</li>
<li><ul>
<li><a href="http://www.mymascot.net/test/products/index.html" title="Collars">Collars</a></li>
<li><a href="" title="Leads" class="active">Leads</a></li>
<li><a href="http://www.mymascot.net/test/products/apparel.html" title="Apparel">Apparel</a></li>
<li><a href="http://www.mymascot.net/test/products/tags.html" title="ID Tags & Charms">ID Tags & Charms</a></li>
</ul>
</li>
<li class="arrow"><a href="http://www.mymascot.net/test/mascots/index.html" title="Our Mascots">Our Mascots</a></li>
<li class="arrow"><a href="http://www.mymascot.net/test/buy/index.html" title="Where To Buy">Where To Buy</a></li>
</ul>
when it should be;
<ul id="mainNavList">
<li class="arrow">Products
<ul>
<li><a href="http://www.mymascot.net/test/products/index.html" title="Collars">Collars</a></li>
<li><a href="" title="Leads" class="active">Leads</a></li>
<li><a href="http://www.mymascot.net/test/products/apparel.html" title="Apparel">Apparel</a></li>
<li><a href="http://www.mymascot.net/test/products/tags.html" title="ID Tags & Charms">ID Tags & Charms</a></li>
</ul>
</li>
<li class="arrow"><a href="http://www.mymascot.net/test/mascots/index.html" title="Our Mascots">Our Mascots</a></li>
<li class="arrow"><a href="http://www.mymascot.net/test/buy/index.html" title="Where To Buy">Where To Buy</a></li>
</ul>
I was under the impression that nested list needed to be wrapped inside its own <li> of the parent list - for semantics sake. This is working perfectly and seems to be validating. Thanks!
liamegan
09.10.06, 05:46 PM
To me, it makes more sense to wrap the child menu in the li element of it's menu parent.
No worries ;)
vBulletin v3.6.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.