By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,787 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,787 IT Pros & Developers. It's quick & easy.

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

P: n/a
<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
Share this Question
Share on Google+
1 Reply


P: n/a
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.