467,908 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,908 developers. It's quick & easy.

the vertical spacing of list items in MSIE having block leveled hyperlinkelements in LI elements

<style>
..menu{
background:yellow;
font:12px Arial;
}
..menu li{
margin-bottom:0;
margin-top:0;
padding-bottom:0;
padding-top:0;
}
..menu a{
display:block;
margin:0;
padding:0;
border:solid 1px red;
}
</style>
<ul class="menu">
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
</ul>
How do I control the vertical spaing in MSIE normally like in Mozilla or
Opera? I mean latest MSIE6 SP1 has such ENORMOUS gaps between those
hyperlinks. What is the solution fixing this, dont convince me I have to
put all those <li>'tags consecutively onto one line...
Jul 20 '05 #1
  • viewed: 1867
Share:
1 Reply
Marek Mänd wrote:
.menu{
background:yellow;
Always set a text color with background, for reasons stated numerous
times here before.
font:12px Arial;
Please don't use px for font size. Had you spent any time reading ciwas,
you'd know that.
.menu li{
margin-bottom:0;
margin-top:0;
After the fix I suggest below, you may not need them. Test in browsers
and see.
padding-bottom:0;
padding-top:0;
You don't need those padding:0; declarations.
.menu a{
display:block;
margin:0;
padding:0;
border:solid 1px red;
}

<ul class="menu">
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
<li><a href="">bla</a></li>
</ul>
latest MSIE6 SP1 has such ENORMOUS gaps between those hyperlinks.
Bug in MSIE/Win. Try this:

..menu a { width: 100%; } /* hack to fix Bill Gates' crap browser */
..menu>a { width: auto; } /* corrected width, hidden from msie win */
dont convince me I have to put all those <li>'tags
consecutively onto one line...


I don't, and my nav anchors display: block work fine. See "on this page"
and "related links" on this page for working example.

http://www.tsmchughs.com/site/help

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by mappo | last post: by
2 posts views Thread by fuzzyman | last post: by
6 posts views Thread by mno | last post: by
1 post views Thread by dave8421 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.