[CSS 2.1] Margins and absolutely positioned elements

The page http://html5.ouvaton.org/bugs3.html exemplifies a case where
absolutely positioned elements are positioned differently in different browsers.

§10.6.4 in the CSS 2.1 specification [1] says:
> 2. [If] 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to
> the static position, set 'auto' values for 'margin-top' and 'margin-bottom'
> to 0, and solve for 'bottom'

§8.3.1 [2] gives the following precision:
> Margins of absolutely positioned boxes do not collapse

This is not, however, quite as specific as what is said about floated elements:
> Vertical margins between a floated box and any other box do not collapse

This leaves me quite confused. Does §8.3.1 affect §10.6.4 in this case?
(Apparently, browsers do dot ‘collapse’ margins in the CSS sense, but rather
choose to take into account or not the margin on the non-absolutely
positioned element when the position of the absolutely positioned element
is calculated.)

I have not studied the specification in its entirety, so I may well have
missed a relevant passage. Would someone care to explain how the
tests are supposed to be rendered?

Thanks in advance,
Øistein E. Andersen

[1] http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
[2] http://www.w3.org/TR/CSS21/box.html#collapsing-margins

Received on Saturday, 7 April 2007 09:31:31 UTC