Re: [css21] Collapsing margins

Hash: SHA1

The spec is referring to situations where the bottom margin of one block
is right up against the top margin of the next block.  Collapsing can
also occur if a parent element has no padding or borders and the
first/last child has margins of its own (then the child's margins would
collapse with the parents).

And yes, what you describe is also a collapsing condition (if a block
element has no height, then it's top and bottom margins will collapse
together, and possibly with the margins of the blocks above/below it).

Andrew Fedoniouk wrote:
| Can anybody comment following [1]:
| <quote>
| If the top and bottom margins of a box are adjoining, then it is
| possible for margins to collapse through it. In this case, the position
| of the element depends on its relationship with the other elements whose
| margins are being collapsed. </quote>
| What exactly means: "top and bottom margins of a box are adjoining"? Top
| and bottom margins of a box are adjacent to each other?
| If yes then there is only one case when it is possible - when block has
| computed value of height equals to zero.
| And also "then it is possible" implies some indetermination.
| Is this the intention?
| OT: Is it possible in principle to define margin collapsing in terms of
| :first-child or something like this?
| Andrew Fedoniouk.
| [1]

- -- - Get Firefox! - Reclaim Your Inbox!

Please avoid sending me Word or PowerPoint attachments.
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Received on Sunday, 19 February 2006 04:41:19 UTC