Opera 7–9.2 shows a rough “quantization” error when a
border has a value greater than
20.47 and it is expressed in
em units, or
in (with other units, like px, the problem would not be visible, even if present.)
In the above conditions the decimals are simply ignored. For example, all margins of
21.1em, … up to
21.9em are rendered exactly the same. This is not a simple rounding error.
Only margins, paddings and borders seem affected, not other properties (like width, left, top, …) The problem is not present below the threshold value of 20.47. No other browser displays a similar behaviour (not even Opera 6.)
The problem has been mostly fixed in Opera 9.5. Padding and margins expressed in em do not show it anymore. Other combinations still had problems, for example em borders were still wrong for values greater than 20.47 in Opera 9.5; this is almost fixed in Opera 10.5. When using percentage widths Opera still ignores all decimal figures (i.e.:
width: x.y% is always equal to
width: x%). There is also a limitation in nth-child.
In the below test case there is a series of green bars having an increasing margin-left with a
0.1em step. Check what happens (in Op7–9.2) when the value exceeds 20.47em: the margins do not increase regularly anymore, but in a “stepped” way.
Other em margin tests:
CSS tests home