IE7-/Win: hasLayout and margins of nested boxes

In all the following test cases a blue box with some margins is inside a pink one. Depending on hasLayout on the inner (blue) and outer (pink) boxes, IE7-/Win shows several anomalies. After each test the IE result are briefly described.

An attempt to summarize the various problems (which are mostly wrong margin collapsing, but not only.) Please note that this is far from being definitive, due to the multiplicity of possible combinations:

hasLayout on outer / inner
\
border on outer
N / N Y / N Y / Y N / Y
no border
Lorem
OK
Lorem
No collapsing
Lorem
No collapsing
Lorem
OK
top border
Lorem
OK
Lorem
No bottom collapsing
Lorem
No bottom collapsing
Lorem
Missing top and horizontal margins
top border & comment
Lorem
OK
Lorem
No bottom collapsing
Lorem
No bottom collapsing
Lorem
OK
bottom border
Lorem
OK
Lorem
No top collapsing
Lorem
No top collapsing
Lorem
Bottom collapsing
bottom border & empty element
Lorem
OK
Lorem
No top collapsing
Lorem
No top collapsing
Lorem
OK
border
Lorem
OK
Lorem
OK
Lorem
OK
Lorem
Missing top and horizontal margins,
Bottom collapsing
border & comment
Lorem
OK
Lorem
OK
Lorem
OK
Lorem
Bottom collapsing
border & comment & empty element
Lorem
OK
Lorem
OK
Lorem
OK
Lorem
OK
hasLayout on outer / inner
\
padding on outer
N / N Y / N Y / Y N / Y
top padding (< margin)
Lorem
OK
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Missing top and horizontal margins
top padding (< margin) & comment
Lorem
OK
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
OK
top padding (> margin)
Lorem
OK
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Missing top and horizontal margins
top padding (> margin) & comment
Lorem
OK
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
Top padding and margin collapsing,
No bottom collapsing
Lorem
OK
bottom padding (< margin)
Lorem
OK
Lorem
No top collapsing
Lorem
No top collapsing
Lorem
Bottom collapsing
bottom padding (< margin) & empty element
Lorem
OK
Lorem
No top collapsing
Lorem
No top collapsing
Lorem
OK
bottom padding (> margin)
Lorem
OK
Lorem
No top collapsing
Lorem
No top collapsing
Lorem
Bottom collapsing
padding (< margin)
Lorem
OK
Lorem
Top padding and margin collapsing
Lorem
Top padding and margin collapsing
Lorem
Missing top and horizontal margins,
Bottom collapsing
padding (< margin) & comment
Lorem
OK
Lorem
Top padding and margin collapsing
Lorem
Top padding and margin collapsing
Lorem
Bottom collapsing
padding (> margin)
Lorem
OK
Lorem
Top padding and margin collapsing
Lorem
Top padding and margin collapsing
Lorem
Missing top and horizontal margins,
Bottom collapsing
padding (> margin) & comment
Lorem
OK
Lorem
Top padding and margin collapsing
Lorem
Top padding and margin collapsing
Lorem
Bottom collapsing

Related: IE7-/Win: Margin collapsing and hasLayout

CSS tests home