|
Posted by Ben C on February 9, 2008, 5:46 am
Please log in for more thread options >>
>>
>> >> Using float:left is the correct solution
>>
>> > It's certainly one solution. Is there any concrete reason to favour
>> > either display:inline or float:left for implementing "inline lists" ?
>>
>> If you want to set widths or heights on the items, or guarantee their
>> adjacency, you need floats really
>
> Widths is a good point. Generally though I don't care - set a bit of
> margin & padding, let the text content take care of the rest. For most
> situations with a non-block list, I care about spacing between words,
> but not the overall item widths.
>
>> (or inline-blocks of course when people start supporting them).
>
> I'd deliberately ignored inline-block. Tired of waiting for support 8-
> (
The sad thing is it would solve a lot of problems. Centered
shrink-to-fit block and image galleries with captions where the images
are all different shapes and sizes can both be done easily with
inline-block.
It can even be used for vertical centering of auto-height blocks.
|