Category: Bootstrap & CSS

What Are Rem Units? (& How to Use Them in CSS)

Of the many HTML styling options that CSS enables, font size is a crucial property — especially when it comes to display responsiveness. Moreover, there are several ways to dictate font size using CSS. Of these, rem units prove to be exceptionally flexible and relatively intuitive.
Rem (short for “root-em”) units dictate an element’s font size relative to the size of the root element. By default, most browsers use a font size value of 16px. So, if the root element is 16px, an element with the value 1rem will also equal 16px. Therefore, rem units are useful for scaling CSS elements in relation to the size of the root element — even if you don’t know what the default font size will be.

Read More
Loading