Absolute Sizing
Absolute or Length sizing refers to sizing methods which have fixed unit lengths and are not dependent on the size of a parent element. Physical units include points and picas, traditionally applied to typography and printed media. Physical lengths can also be specified in inches and centimeters, etc.
Below is a table listing common physical units and their equivalents to one another. The column headed '1" Equivalents' shows values compared to 1 inch. The column headed '12pt Equivalents' shows values compared to 12pt, which is a common font size. This should help make the conversion simpler for you. E.g., if you want to convert points to pica, you can see from the fourth column that 1 pica equals 12 pts.
Unit |
Abbrev. |
1" Equivalents | 12pt Equivalents |
---|---|---|---|
inch | in | 1 | 1/6 |
points | pt | 72 | 12 |
picas | pc | 6 | 1 |
centimeter | cm | 2.54 | 0.4233 |
Example Absolute Font-Size Declarations
p { font-size: 0.25in; }
p { font-size: 18pt; }
p { font-size: 1.5pc; }
p { font-size: 0.635cm; }
When specifying a measurement, there cannot be any spaces between the measurement and the unit.
Using Physical Units
When using inches or any of the 'classic' linear units of measurement, the results may not precisely match the specified measurement when rendered on the user's display. The user agent must determine the pixels-per-inch (ppi) resolution of the display, and convert the linear measurement to the equivalent in pixels on the display. Some user agents may determine the resolution of the display from preference settings in the OS, or they may even make assumptions about the resolution.
The result is that 1in
may not result in 1 inch length measured with a ruler on the display.
Regardless, equivalent lengths using any unit should yield identical sizes on the same display.
For example, all the declarations above should render consistently,
so all of the rules should render identical sizes on the display;
however, they may not be precisely 0.25 inches.
Examples
This sentence is sized using the absolute length 0.25 inches.
This sentence is sized using the absolute length 18 points.
This sentence is sized using the absolute length 1.5 picas.
This sentence is sized using the absolute length 0.635 centimeters.
Theoretically, each of the above sentences should render in identical font sizes.