W3C home > Mailing lists > Public > public-css-testsuite@w3.org > October 2013

Re: Issue with margin-collapse-clear-012.htm and margin-collapse-clear-013.htm

From: Bruno Fassino <fassino@gmail.com>
Date: Mon, 28 Oct 2013 16:52:59 +0100
Message-ID: <CAL62zVdB9Dor8WNwYbLrpauzfBgWRhXkLMXo69=JTV1xyzLOnA@mail.gmail.com>
To: Robert Hogan <robhogan@gmail.com>
Cc: Public CSS test suite mailing list <public-css-testsuite@w3.org>, Gérard Talbot <css21testsuite@gtalbot.org>
On Mon, Oct 28, 2013 at 2:11 PM, Robert Hogan <robhogan@gmail.com> wrote:

> HI Bruno,
> That seems sensible. However I'm having trouble making sense of the
> case where negative margins are involved.
> <div id="parent">
>   <div id="float" style="float:left; height: 100px; width: 100px;
> background-color:blue;"></div>
>   <div id="self-collapsing-with-clearance" style="clear: both;
> margin-top: -40px; margin-bottom:40px;"></div>
>   <div id="following-sibling">Text</div>
> </div>
> FF and IE both render the 'Text' 40px below the float. Can you help me
> understand why?

Following the same lines as before, I believe that here a clearance of
140px is needed to put the top border edge of
self-collapsing-with-clearance just after the float. The margins of
self-collapsing-with-clearance collapse to zero and its margin edge (both
top and bottom) is 40px below the float (the top border edge is "outside" /
higher than the margin edge).
following-sibling the starts at 40px below the float.

Received on Monday, 28 October 2013 15:53:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:19 UTC