css font size em





More units in CSS. To make it even easier to write style rules that depend only on the default font size, CSS has since 2013 a new unit: the rem. The rem (for root em) is the font size of the root element of the document. Using em Units. A more suitable CSS unit for font sizes is the em.By setting the base font size and then defining the font sizes of the elements on the page in em we can relatively easily get Internet Explorers text resize feature working. Set Font Size With Em. To avoid the resizing problem with Internet Explorer, many developers use em instead of pixels. The em size unit is recommended by the W3C.