- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Wed, 10 Sep 2008 13:06:24 +0200
- To: Alex Mogilevsky <alexmog@microsoft.com>
- Cc: Bruno Fassino <fassino@gmail.com>, Arron Eicholz <Arron.Eicholz@microsoft.com>, www-style <www-style@w3.org>
Alex Mogilevsky wrote: > Have you changed the test recently? > It seems the red moved since this thread started, Yes, the test was originally invalid and I fixed it. > The expected behavior is as follows > > * "outer" has min-height of 21px * "inner" is 20px tall, therefore > "outer" would be at most 20px tall if not for min-height, which means > "inner" bottom margin doesn't collapse with "outer" bottom margin * > Since "inner" bottom margin doesn't collapse with the parent, it > contributes to the height of the parent * "outer" height therefore > must be 100px * "green" div then is positioned at 100px I have to agree with Bruno about this, since the 3rd step in 10.7 does return 21px as the height. Since 'min-height' is used as the computed value of 'height' in that that step, the result is the same as if 'height' itself had been set to 21px. I've added 2 more tests to demonstrate this using 'height' instead of 'min-height' http://lachy.id.au/dev/css/tests/adhoc/collapsing-margins-04.html http://lachy.id.au/dev/css/tests/adhoc/collapsing-margins-05.html > Firefox doesn't include "inner" bottom margin into "outer" height. > Opera and Safari are 1 pixel off. Not sure why. IE8 has correct > layout. Opera and Safari are off by 1px due to the same bug they show in collapsing-margins-01.html. -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Received on Wednesday, 10 September 2008 11:07:04 UTC