Hello,

I have a list that I want to display inline. So I just added that rule to the 
li.

The problem is that the site is actually a bunch of static files generated by a 
script. And this script, for complicated reasons, does not add any whitespace 
between the li elements, nor before or after the content of the li elements 
which contain only one word each. Without any whitespace anywhere, the list 
elements don't wrap at all and if the list is longer than will fit in the width 
of the page, it is either cut off (if overflow: hidden) or generates a 
horizontal scroll bar.

I have found that if I use "display: inline-block" instead of just inline, the 
li elements wrap as they would if there was whitespace in the line. This works 
fine in webkit browers, Firefox, Opera and even IE8. But IE6 and IE7 apparently 
consider inline-block to be just "block", so the list items just stack up as 
usual for a list.

I think I understand what is going on here. An inline list without any 
whitespace is the same as if it were just one long string. Adding whitespace 
before or after the items in the li separates the string into words. However, 
the presence or absence of whitespace *between* the li elements shouldn't cut 
the string. But it does: if there is no whitespace around the list items but 
there is a space between the li elements, the list wraps. Is there an 
explanation for this?

I know I could ask the developer to add a space between the li elements and 
then use display: inline, but I'm wondering if there is there a way around the 
IE6 and 7 problem without doing this.

Thanks,

Ellen
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to