|
Posted by fred.haab@gmail.com on 06/14/06 01:37
fred.haab@gmail.com wrote:
> Wÿrm wrote:
> > I suggest you should spend some time and read
> > http://www.w3.org/TR/CSS21/visuren.html#floats and how float is moved from
> > the normal flow.
> >
> > "Since a float is not in the flow, non-positioned block boxes created before
> > and after the float box flow vertically as if the float didn't exist.
> > However, line boxes created next to the float are shortened to make room for
> > margin box of the float."
>
> I still don't agree that this explains it away, though. The containing
> div was created before, it's true, but it's a parent container, not
> simply just another container that was created before the floated
> container.
>
> In other words, give this:
>
> <div>
> </div>
> <div class="right">
> </div>
>
> The text makes perfect sense, but in this case:
>
> <div><div class="right"></div></div>
>
> The outer div is the parent, not simply some other box that was created
> before or after.
Who is Jennifer Niederst Robbins? She wrote the "Web Design in a
Nutshell" for O'Reilly. That doesn't make her a goddess of HTML, she's
not one of the people who wrote the spec (as far as I know), she just
wrote a book. However, I found in her book what I remembered.... page
371, second bullet point about floats:
"The floated element stays within the content area of its containing
block (the nearest block-level ancestor element). It does not cross
into the padding."
So I think you guys are the ones misreading the specs... its not a
floated box before or after we're talking about, it's the containing
element.
[Back to original message]
|