Re: totally collapsed

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.
http://terrainformatica.com




----- 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
margins.

> 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.

-David

[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