IE7 unnecessary horizontal scrollbar caused by italics


In presence of italic text in a shrink-wrapping container, sometimes IE7 displays an unnecessary horizontal scrollbar. In this test case there is a span with hasLayout and text-align:center in effect. The same problem occurs with:

Overflow:auto on the element with italics fixes the problem. In IE7 italic text in a shrink-to-fit box sometimes creates unnecessary box expansion: italics creating overflow in IE7-.

Unnecessary horizontal scrollbar in IE7 also occurs in other cases when an hasLayout shrink-to-fit box contains some overflowing content, see IE7 unnecessary horizontal scrollbar with shrink-to-fit boxes. So this italic problem looks like a particular case of a more general problem.

CSS tests home