In all the following test cases a green box with 1em
margin left and top is contained in a wrapper with hasLayout and border (and gray grid background.) A font-size:2em
is applied either to the inner box or to container.
In some cases IE7-/Win computes the em
margins of the inner element using the font-size in effect on the container, instead of the one specified on the element itself.
2em on inner span hasLayout
2em on wrapper, inner span hasLayout
2em on inner span no hasLayout
2em on inner div hasLayout
2em on inner block span hasLayout
2em on inner div no hasLayout
2em on inner block span no hasLayout
2em on inner ap span
2em on wrapper, inner ap span
2em on inner ap div
2em on inner ap block span
2em on inner float span
2em on wrapper, inner fl span
2em on inner float div
2em on inner float block span
A somewhat similar problem: IE7-/Win: letter-spacing, word-spacing and hasLayout