- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Thu, 19 Nov 1998 23:09:37 +0000 (GMT)
- To: "L. David Baron" <dbaron@fas.harvard.edu>
- cc: www-style@w3.org
On Thu, 19 Nov 1998, L. David Baron wrote: > *Any* adjacent vertical margins in the normal flow are collapsed. Hmm. Yes, you're right. Sorry. So this code snippet: <BODY> <DIV> <UL> </UL> </DIV> <BLOCKQUOTE> <OL> </OL> </BLOCKQUOTE> </BODY> With this CSS: * { padding: 0; border: none; margin: 20px 10px; } .BODY { background: #111111; } .DIV { background: #222222; } .UL { background: #333333; } .BLOCKQUOTE { background: #444444; } .OL { background: #555555; } Would make the following containerships: BODY +-DIV-------------------------+ | +-UL----------------------+ | | | | | | +-------------------------+ | | | +-----------------------------+ +-BLOCKQUOTE------------------+ | | | +-OL----------------------+ | | | | | | +-------------------------+ | +-----------------------------+ And would be rendered like this (where the lines and labels merely show where the background colours change) because of vertical collapse of the margins: BODY +-DIV-------------------------+ | +-UL----------------------+ | | | | | +-+-------------------------+-+ BLOCKQUOTE <<< * +-+-OL----------------------+-+ | | | | | +-------------------------+ | +-----------------------------+ And you want to know what colour should be used between the OL and the UL, in the area marked "*"? Logically, I would say it would be the colour of the BODY: #111111. -- Ian Hickson
Received on Thursday, 19 November 1998 18:09:40 UTC