Dark Knight Posted October 30, 2009 Share Posted October 30, 2009 <div> <ul id="list"> <li><a href="http://www.link.com">First link</a></li> <li><a href="http://www.link.com">Second link</a></li> <li><a href="http://www.link.com">Third link</a></li> </ul></div> #list { background-color: #044; font-size: 9pt; color: #066; padding: 0px; margin: 0px;}#list li { margin-left: 25px; list-style-type: disc; color: silver;}#list a, #list a:visited { display: block; font-size: 9pt; color: #099; text-decoration: none;}#list a:hover { text-decoration: underline;} Why the code above is not working in IE 6? In FF, the list has no distance between what is in the list. What's the problem? Link to comment Share on other sites More sharing options...
thescientist Posted October 30, 2009 Share Posted October 30, 2009 maybe try adding 0px margins and padding to the <li>'s? Link to comment Share on other sites More sharing options...
roundcorners Posted October 30, 2009 Share Posted October 30, 2009 The scientist might be correct, the browser gives <li> elements default padding and margin. If I were you I would reset all padding and margin on those elements and work backwards.P.S. browsers don't always know how to interpret pt unit measurements. pt is generally reserved for print, try px (pixels) or better yet em which will render your type relative to it's parent default em size. Link to comment Share on other sites More sharing options...
Dark Knight Posted October 30, 2009 Author Share Posted October 30, 2009 It didn't work. plus adding 0px to both margin and padding will make my list to loose it's distance. Link to comment Share on other sites More sharing options...
thescientist Posted October 30, 2009 Share Posted October 30, 2009 you can always compensate by declaring line-height and font-sizes. Link to comment Share on other sites More sharing options...
Dark Knight Posted October 31, 2009 Author Share Posted October 31, 2009 you can always compensate by declaring line-height and font-sizes.yes but now affects FF. Link to comment Share on other sites More sharing options...
thescientist Posted October 31, 2009 Share Posted October 31, 2009 what kind of DTD are you using? Link to comment Share on other sites More sharing options...
Dark Knight Posted October 31, 2009 Author Share Posted October 31, 2009 what kind of DTD are you using?DTD XHTML 1.0 Transitional Link to comment Share on other sites More sharing options...
thescientist Posted October 31, 2009 Share Posted October 31, 2009 if you can, try going strict. It's good practice in general. Link to comment Share on other sites More sharing options...
Dark Knight Posted October 31, 2009 Author Share Posted October 31, 2009 if you can, try going strict. It's good practice in general.No result. Link to comment Share on other sites More sharing options...
thescientist Posted November 1, 2009 Share Posted November 1, 2009 show your code Link to comment Share on other sites More sharing options...
dsonesuk Posted November 1, 2009 Share Posted November 1, 2009 its how IE applies padding, margins and sizing of disc, try below<style type="text/css">#list { background-color: #044; color: #066;padding-left:25px;margin:0;/*IE6*/}#list li {list-style-type: disc;font-size: 12px; /*control disc size, controls spacing of li height for IE6*/color: silver;line-height:8px; /*IE6*/margin-left:25px;}#list a, #list a:visited { display: block; color: #099; text-decoration: none; font-size: 12px; line-height:14px!important; height:15px!important; line-height:9px;/*IE6*/ height:9px;/*IE6*/}#list a:hover { text-decoration: underline;}</style> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.