|
Posted by Jonathan N. Little on 06/14/06 04:53
fred.haab@gmail.com wrote:
> 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."
I am sorry but it not what it says here, and they wrote the spec which I
thinks trumps!
www.w3.org/TR/CSS21/visuren.html#floats
Scroll down a bit as I said earlier to the 3rd diagram, "A floating
image obscures borders of block boxes it overlaps."
It shows and describes the very same behavior as a floated image
contained within the upper DIV, and the image extends beyond the base of
its container and displaces the DIV below. It *is* the correct behavior.
I am not making this up.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|