W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: totally collapsed

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 2 Jul 2004 09:18:58 -0700
Message-ID: <000f01c46050$5711c8d0$0401a8c0@ATHLON>
To: "L. David Baron" <dbaron@dbaron.org>, <www-style@w3.org>

Thanks a lot, David!

I am testing in quirks *and strict* modes.
Collapsing behavior is the same.

For me it seems like no one UA currently follows the rule:

"Collapsing is based on the used value of 'padding', 'margin', and 'border'
(i.e., after resolving any percentages). The collapsed margin is calculated
over the used value of the various margins."

So paragraph having default margins
<p> and <p style="margin:1em 0"> are not the same for collapsing rules
internally used in UA.

It's not fair, I think.

Andrew Fedoniouk.

----- Original Message -----
From: "L. David Baron" <dbaron@dbaron.org>

On Thursday 2004-07-01 22:38 -0700, Andrew Fedoniouk wrote:
>  p { border: blue solid 1px; }
> <body>
> <p>paragraph</p>
> </body>
> margins of the paragraph are collapsed ,
> and here
>  p { border: blue solid 1px; margin:1em }
> <body>
> <p>paragraph</p>
> </body>
> margins of the paragraph are not collapsed.

I don't think what you're seeing has anything to do with collapsing

> I am testing this in Internet Explorer and Gecko.

I assume you're testing Gecko in quirks mode [1].  If that's the case,
it has UA stylesheet rules applied in quirks mode that remove the
default margins from the first child of BODY or TD (not actually
:first-child, though, but instead a selector that doesn't match an
element that is the first child element but is preceded by text).  This
is really a minimally sufficient imitation (since it doesn't account for
a P inside a DIV, etc.) of of pre-CSS margin handling (and what
IE/Windows does), where BODY and TD absorb the default top margins of
their first child.


[1] http://www.mozilla.org/docs/web-developer/quirks/

L. David Baron                                <URL: http://dbaron.org/ >
Received on Friday, 2 July 2004 12:20:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:14 UTC