Re: Margin collapsing and floats

On Friday 2002-09-13 19:06 -0400, Boris Zbarsky wrote:
> It seems that what's really meant here is that floated boxes' margins do
> not collapse except with descendant boxes...

Note that this is what CSS1 said:

  and the margins never collapse with the margins of adjacent elements.
  [ http://www.w3.org/TR/1999/REC-CSS1-19990111#floating-elements ]

but it was changed in CSS2:

  * Vertical margins between a floated box and any other box do not
    collapse.
  [ http://www.w3.org/TR/1998/REC-CSS2-19980512/box.html#collapsing-margins ]

although it was not noted in the changes from CSS1 in
http://www.w3.org/TR/1998/REC-CSS2-19980512/changes.html#changes-from-css1


I wrote a quick test for this behavior at:
  http://www.people.fas.harvard.edu/~dbaron/css/test/2002/float-mc

Some quick results for this test:
 * Mozilla (Linux) - CSS1 behavior
 * Opera 6 (Linux) - CSS1 behavior
 * Konqueror 3.0.0 - CSS2 behavior
 * Netscape 4.79 (Linux) - impossible to tell

I'd be interested to hear what WinIE and MacIE do.

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >

Received on Friday, 13 September 2002 19:58:24 UTC