|
Posted by Ben C on 10/22/06 10:57
On 2006-10-22, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <57af7$453aecef$40cba7ac$13039@NAXS.COM>,
> "Jonathan N. Little" <lws4art@centralva.net> wrote:
[snip]
>> It's correct, the DIV with the short caption is not as tall so can
>> "catch" the next floated DIV. If you wish for all to stack nicely and
>> evenly set all the DIVs to the same height. Pick a value that will
>> accommodate your longest caption and the DIVs will fall on a grid.
>
> Yes, I am sure it is correct as it behaves thus in all my
> browsers. And I sort of use your sort of explanations to explain
> it to myself (even to the extent of using the phrase "catching")
> and yet I am still a tad puzzled. Perhaps I have some distracting
> models or inappropriate ones like that floats are a bit like text
> that wraps naturally,
I think that is still a good mental model. The difference is, as you see
with this example, when floats have different heights. For inline boxes,
the line height is always made at least big enough for everything on the
line, and the boxes always sit on the lines, so nothing can "catch".
Another thing to be aware of with floats is that their vertical position
is initially determined by the vertical position of the line on which
they originated (or the next line in the case of FF-- this is a known
bug). But if they are moved downwards because they don't fit, they go
"off the rails" of the line boundaries, and occupy a vertical position
to the nearest pixel that gives them the horizontal space they need.
Navigation:
[Reply to this message]
|