[thelist] Collapsing Margins (was: CSS top-margin quirck?)

Brooking, John John.Brooking at sappi.com
Mon May 8 13:29:16 CDT 2006


Thanks for naming it for me, Georg. I basically understand collapsing
margins, although I admit my eyes began to glaze over before getting
completely through any of those articles. My experimentation indicates
that the two browsers I tested both implement a collapsing top margin by
making it the container's margin, no matter what the container's margin
originally was. This makes some sense, except in the case where the
container had a margin of zero, in which case it seems counter-intuitive
to me. I was erroneously expecting that the margin would stay attached
to the child and allow the parent's background to shine through, since
the parent had no margin to collapse with. However, it obviously still
does the "collapse", and assigns the result to the parent, essentially
transferring the margin from child to parent. The result is that the
background that comes through the margin is now the child's
grandparent's background, not the parent's, as I expected (and require).
But at least I have a choice of workarounds! :-|

I get into serious CSS just frequently enough to forget the subtleties
in between times! :-(

- John

P.S. Yes, I see now that I misspelled "quirk"!

-- 


This message may contain information which is private, privileged or confidential and is intended solely for the use of the individual or entity named in the message. If you are not the intended recipient of this message, please notify the sender thereof and destroy / delete the message. Neither the sender nor Sappi Limited (including its subsidiaries and associated companies) shall incur any liability resulting directly or indirectly from accessing any of the attached files which may contain a virus or the like.




More information about the thelist mailing list