Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:38 PM
Marek Mänd
Guest
 
Posts: n/a
Default 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...
  #2  
Old July 20th, 2005, 11:38 PM
Brian
Guest
 
Posts: n/a
Default Re: the vertical spacing of list items in MSIE having block leveledhyperlink elements in LI elements

Marek Mänd wrote:
[color=blue]
> .menu{
> background:yellow;[/color]

Always set a text color with background, for reasons stated numerous
times here before.
[color=blue]
> font:12px Arial;[/color]

Please don't use px for font size. Had you spent any time reading ciwas,
you'd know that.
[color=blue]
> .menu li{
> margin-bottom:0;
> margin-top:0;[/color]

After the fix I suggest below, you may not need them. Test in browsers
and see.
[color=blue]
> padding-bottom:0;
> padding-top:0;[/color]

You don't need those padding:0; declarations.
[color=blue]
> .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.[/color]

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 */
[color=blue]
> dont convince me I have to put all those <li>'tags
> consecutively onto one line...[/color]

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/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles