HighDots Forums  

Can't remove spacing between <li> items in IE6

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Can't remove spacing between <li> items in IE6 in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JB
 
Posts: n/a

Default Can't remove spacing between <li> items in IE6 - 01-13-2006 , 06:17 AM






Hi All,

This is doing my head in! Please help.

I've built a simple <ul> to serve as a menu for a page I'm working on. I
have tested the menu in Mozilla Fireworks 1.5 and it's fine - nice and
compact with no extra spacing - but in Microsoft Internet Explorer 6 there
are huge gaps between each list item.

URL :http://217.154.67.191/left_menu.htm

It's got to be a simple thing I'm missing so please point it out to me.

Many thanks,

JB



Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: Can't remove spacing between <li> items in IE6 - 01-13-2006 , 07:09 AM






JB wrote:

Quote:
This is doing my head in! Please help.

I've built a simple <ul> to serve as a menu for a page I'm working on. I
have tested the menu in Mozilla Fireworks 1.5 and it's fine - nice and
compact with no extra spacing - but in Microsoft Internet Explorer 6 there
are huge gaps between each list item.

URL :http://217.154.67.191/left_menu.htm

It's got to be a simple thing I'm missing so please point it out to me.
There are no gaps. When hovering, the blue backgrounds aren't
separated from each other. I think you have to look at the line-height
on the a element.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -


Reply With Quote
  #3  
Old   
JB
 
Posts: n/a

Default Re: Can't remove spacing between <li> items in IE6 - 01-13-2006 , 07:19 AM




"Els" <els.aNOSPAM (AT) tiscali (DOT) nl> wrote

Quote:
JB wrote:

This is doing my head in! Please help.

I've built a simple <ul> to serve as a menu for a page I'm working on. I
have tested the menu in Mozilla Fireworks 1.5 and it's fine - nice and
compact with no extra spacing - but in Microsoft Internet Explorer 6
there
are huge gaps between each list item.

URL :http://217.154.67.191/left_menu.htm

It's got to be a simple thing I'm missing so please point it out to me.

There are no gaps. When hovering, the blue backgrounds aren't
separated from each other. I think you have to look at the line-height
on the a element.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Thanks for that Els but apparently this is a documented issue:
http://www.hicksdesign.co.uk/journal/ie-whitespace-bug

None of the solutions there worked but I eventually found a fix by hiding a
couple of commands from all browsers except IE by putting an underscore
before them.

#navigationContainer ul {
list-style-type: none;
font-family: Arial, Helvetica, sans-serif;
font-size:0.6em;
padding-bottom:8px;
_float:left;
_clear:both;
}

Not ideal but it works!

JB




Reply With Quote
  #4  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: Can't remove spacing between <li> items in IE6 - 01-13-2006 , 07:30 AM



On Fri, 13 Jan 2006, JB wrote:

Quote:
font-size:0.6em;
Ouch!

Quote:
Not ideal but it works!
"For very small values of the term 'works'."



Reply With Quote
  #5  
Old   
JB
 
Posts: n/a

Default New topic: huge margin in Firefox - 01-13-2006 , 07:33 AM



New problem in Firefox. Tell me why there is a large left margin when margin
is set to 0 and there are no instance of huge amounts of padding.

http://217.154.67.191/left_menu.htm

Thanks,

Jeff



Reply With Quote
  #6  
Old   
JB
 
Posts: n/a

Default Re: Can't remove spacing between <li> items in IE6 - 01-13-2006 , 08:00 AM




"Alan J. Flavell" <flavell (AT) ph (DOT) gla.ac.uk> wrote

Quote:
On Fri, 13 Jan 2006, JB wrote:

font-size:0.6em;

Ouch!

Not ideal but it works!

"For very small values of the term 'works'."

0.6em is bad is it?

I've changed it to x-small.

Thanks,

JB




Reply With Quote
  #7  
Old   
Stuart Scharf
 
Posts: n/a

Default Re: New topic: huge margin in Firefox - 01-13-2006 , 08:22 AM



JB wrote:
Quote:
New problem in Firefox. Tell me why there is a large left margin when margin
is set to 0 and there are no instance of huge amounts of padding.

http://217.154.67.191/left_menu.htm

Thanks,

Jeff


changing the padding on navigationContainer ul to

padding: 0 0 8px 0;

fixes it. Not sure where it got the larger left padding from though.





Reply With Quote
  #8  
Old   
JB
 
Posts: n/a

Default Re: New topic: huge margin in Firefox - 01-13-2006 , 08:29 AM



Quote:
changing the padding on navigationContainer ul to

padding: 0 0 8px 0;

fixes it. Not sure where it got the larger left padding from though.



Thanks for that. All sorted in Firefox but the problem has transferred to
IE6! I now have the list starting from the center of the page!

Help!

Jeff




Reply With Quote
  #9  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Can't remove spacing between <li> items in IE6 - 01-13-2006 , 08:34 AM



JB wrote:

Quote:
"Alan J. Flavell" <flavell (AT) ph (DOT) gla.ac.uk> wrote in message
news:Pine.LNX.4.62.0601131328160.25873 (AT) ppepc56 (DOT) ph.gla.ac.uk...
On Fri, 13 Jan 2006, JB wrote:

font-size:0.6em;

Ouch!

Not ideal but it works!

"For very small values of the term 'works'."

0.6em is bad is it?

I've changed it to x-small.
Just as bad. Use: font-size: 100%;
so most people can read it, and in doing so you respect their chosen
default size.

BTW, the comment tags in your style sheet need to be removed.
The <!-- and the -->. There can't be any HTML in a style sheet.

When you are ready:
http://jigsaw.w3.org/css-validator/validator-uri.html

--
-bts
-Warning: I brake for lawn deer


Reply With Quote
  #10  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: New topic: huge margin in Firefox - 01-13-2006 , 08:57 AM



On Fri, 13 Jan 2006, JB wrote:

Quote:
changing the padding on navigationContainer ul to

padding: 0 0 8px 0;

fixes it. Not sure where it got the larger left padding from though.

Thanks for that. All sorted in Firefox but the problem has
transferred to IE6! I now have the list starting from the center of
the page!
You know, this isn't a write-only newsgroup: most of the simple issues
have been discussed before and solutions presented, and can be
consulted in newsgroup archives such as google groups.

The fact is that different browsers have different in-built default
styles for formatting list items, even though the final results look
similar.

As a starting point, if one it trying to apply one's own style to list
items, it's necessary to specify at least the following properties
explicitly: left margin and left padding for ul and li (and for ol, of
course, if you're using that).

This doesn't seem to be the case yet for your posted sample URL
http://217.154.67.191/left_menu.htm

I haven't seen any reason yet (or justification for) using CSS
constructs which fail at the W3C CSS checker. Sometimes, such syntax
trickery can solve an otherwise insoluble browser defect - but at
least get all the other things right *first* before deciding whether
to go for that "last resort".

Don't overlook the diagnostic technique of defining distinctive
visible borders on different elements, to help to understand how
various browsers are interpreting your CSS.

As for text sizing, I recommend
http://www.xs4all.nl/~sbpoley/webmatters/fontsize.html



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.