Web Design – Font-Relative CSS3 Units


In CSS, font-relative lengths can be expressed in em , ex , and in CSS3 also in ch or rem :

Unit Description
em 1 em is equal to the current font size, which can be used to automatically adapt the font size proportions to the font size chosen by the user in the browser. The em unit defines the proportion of the width and height of a given letter with respect to the point size of a given font. This unit originates in typography.
ex 1 ex is the x-height of a font (approximately half the font size).
ch The used advance measure of the 0 glyph (ZERO, U+0030) of the font used to render the text.
rem The computed value of font-size on the root element.