x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x

The boxes above contain several lines of text and have different line-height ranging from 1.0 to 2.1. When the specified line-height does not translate into an integer number of pixels, browsers use different approximation strategies:

  1. The line-height is rounded to the nearest integer value of pixels, and this value is used for all the lines. Done by IE7-.
  2. The line-height is truncated down to an integer value of pixels, and this value is used for all the lines. Done by Safari, Opera.
  3. There is an attempt to respect the non integer pixel value for the line-height. The line-height measured in pixels is not constant over all the lines, but bounces between two values, differing by one unit. The mean of these values approximates (better than in the two above strategies) the specified line-height. Of course this two-values jumping is the observed effect of some internal computations where the line-height takes into accounts fractional pixels. Done by Firefox and IE8.

If the browser text size is resized the page must be refreshed to have the data in the above table correctly recomputed.

CSS tests home