© Mikael Olsson 2019
Mikael OlssonCSS3 Quick Syntax Referencehttps://doi.org/10.1007/978-1-4842-4903-1_9

9. Units

Mikael Olsson1 
(1)
Hammarland, Finland
 

There are several units to choose from when specifying the size of a property’s value.

Absolute Units

The absolute units of length are centimeter (cm), millimeter (mm), and inch (in). Although these units are meant to look the same regardless of the screen resolution, it is not always the case because web browsers do not always know the exact physical size of the display medium.
.one-cm { font-size: 1cm; }
.one-mm { font-size: 1mm; }
.one-in { font-size: 1in; }

These units are mainly useful when the size of the output medium is known, such as for content that will be printed to paper. They are not recommended ...

Get CSS3 Quick Syntax Reference: A Pocket Guide to the Cascading Style Sheets Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.