CSS Sizing and Spacing

CSS

Using only (REM, EM, %, vh, vw) Units

There are alot of units to choose when it comes to sizing and spacing your elements. The most known ones though, are these right here:

I myself don't recommend using pixels everywhere, like spacing and sizing, because they will stay at the same pixel rate forever. But using "REM" or "EM" units is alot better, because when an user changes their font size in a browser, the REMs/EMs font size becomes automatically smaller aswell. REM/EM are like a pack of pixels (16 commonly), which can get bigger in size if you change your pixel default size. So if you put 20 pixels as default value, the 1 REM/EM value is now 20 pixels.

Using Pixels Only

If you are using pixels, it means you are setting a fixed value for an element, meaning if someone were to change font size in a browser, that element's pixels wont change:

Be cautious of using only pixels, since they set everything to a fixed value.