Absolute length units describe concrete physical dimensions. An
absolute length consists of an optional sign character ("+"/"-"),
followed by a number, followed immediately by an absolute length unit.
If the given length is zero, the sign character and unit measure
are optional. Values that can not be supported by the rendering device
should be mapped to the nearest value that CAN be supported.
Absolute length units are useful when the parameters of the rendering
device are known to the author.
Absolute Length Units in CSS
in
[CSS1|CSS2]
[IE3|N4|O3.5]
Reference Measure: 12in=1foot, 1in=2.54cm
Description: Inches
cm
[CSS1|CSS2]
[IE3|N4|O3.5]
Reference Measure: 2.54cm=1in, 1cm=10mm
Description: Centimeters
mm
[CSS1|CSS2]
[IE3|N4|O3.5]
Reference Measure: 10mm=1cm
Description: Millimeters
pt
[CSS1|CSS2]
[IE3|N4|O3.5]
Reference Measure: 12pt=1pc, 1pt=1/72in
Description: Points
pc
[CSS1|CSS2]
[IE3|N4|O3.5]
Reference Measure: 6pc=1in, 1pc=12pt
Description: Picas
Example
div
{ margin-left: 1cm }
Browser Peculiarities
Internet Explorer
3.0+:
- If no length unit is specified, the units default to pixels. They should be ignored.
Netscape
4.x+:
- The "no length unit = pixels" bug described for Internet Explorer
is also said to be true for Netscape, but testing in Netscape 4.04
and 4.5 did not indicate that this is true.