Back to Developer Roadmap

Absolute vs. Relative Units

src/data/roadmaps/css/content/[email protected]

4.0622 B
Original Source

Absolute vs. Relative Units

Absolute units in CSS represent fixed measurements, like pixels (px) or inches (in), and will always render at the same size regardless of screen size or other factors. Relative units, on the other hand, are based on other values, such as the font size of the parent element (em), the viewport width (vw), or the root element's font size (rem), allowing for more flexible and responsive layouts.

Visit the following resources to learn more: