Font-Relative Units
Let's take a look at CSS units relative to font, such as em, rem, ex, and ch.
We'll cover the following...
The em
unit
.element {
width: 30em;
}
The em
unit is the value assigned to the element’s font-size
, and its exact value changes between elements. The measurement itself is the width of the letter “m.”
The length changes only if we change the font-size
. It doesn’t change if the font-family
...