CSS Units – Which ones to use and which to stop using! – HTML CSS Tutorial

by | Nov 1, 2020 | 0 comments

CSS Units – Which ones to use and which to stop using! – HTML CSS Tutorial

by | Nov 1, 2020 | CSS Tips and Tricks | 0 comments



Don’t guess, know when to use px, %, rm vs em, fr, ch, vw, vh and more…CSS gives you a LOT of options and each is there for a purpose.

SPECIAL THANKS to https://twitter.com/chaddonohue for peer reviewing this content!

In this tutorial, we’ll cover all the CSS units, and, most importantly, which ones to use (and which NOT to use) for which situations.

In web development, css units are often confusing as there are just many options. And, many css units – like px vs em vs rem, all seem to get the job done at times. But some are simply better than others and there are very good reasons why.

source