Grokking CSS for Web Development
Vote

0% completed

​

Relative Units (rem, em, vw, vh)

A relative unit is a length that the browser calculates from some other size: the font size of the page's root element, the font size of an element, or the size of the browser window. Because the other size can change, a relative length changes with it. This lesson converts the recipe card from the previous lesson to relative units and measures what each unit follows.

rem: relative to the root font size

rem stands for "root em". One rem equals the font size of the <html> element, which is the root of the page

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content