On 1/26/06, Matt Dawson <[EMAIL PROTECTED]> wrote:

> What's the benefit of displaying the list as inline if floating each <li>
> element left within the containing block could accomplish the same effect?
> Are there any examples where you *have* to use the display: inline rule to
> acheive the intended effect of taking a list of <li> elements and making
> them align horizontally.  In looking at a bunch of different examples from
> across the web, I see that this style is used pretty consistently for this
> kind of use.  I just can't figure out *why.*
>

I just ran into one of those situations today, funnily enough. I am in
the habit of giving my navgation <li> elements display:inline, so I
did this with a nav I was making with a 'tabbed' look (achieved with
background images). The tabs had to be a fixed size, and as I
struggled to achieve this I realised that inline elements can't
receive width. So floated elements it had to be. (Floats are
automatically block elements, so they can be given a fixed width.) In
fact, I had to position the link text absolutely within the <li>,
which meant making the inner <a> elements block as well.

Conversely, for menu items of variable size, inline would be a more
natural choice.

Chris
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to