W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2008

Re: [CSS2.1] float positioning rules

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 12 Nov 2008 07:31:54 -0800
To: Robert Stam <robert@tallcomponents.com>
Cc: public-css-testsuite@w3.org, fantasai.lists@inkedblade.net
Message-ID: <20081112153154.GA3616@pickering.dbaron.org>

On Wednesday 2008-11-12 03:55 -0600, Robert Stam wrote:
> According to the rules that govern the behavior of floats (section
> 9.5.1), we would expect the floating div, in the example below, to be
> positioned at the same top position as the paragraph. It satisfies rule
> 8 (placing a floating box as high as possible) and violates none of the
> rules. This seems awkward, but also differs from other major
> implementations.
> 
> Can anybody clarify on this matter? Are there any anonymous boxes
> created around floats to ease the formatting?

It would not be as high as the paragraph, because of rule 4:

# A floating box's outer top may not be higher than the top of its
# containing block. When the float occurs between two collapsing
# margins, the float is positioned as if it had an otherwise empty
# anonymous block parent taking part in the flow. The position of
# such a parent is defined by the rules in the section on margin
# collapsing. 

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Wednesday, 12 November 2008 15:32:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:57 GMT