CSS Ruler – useful reference for relative and absolute dimensions in CSS


I’ve been working and playing with CSS for several years, and still haven’t heard of some of these before. And they can be quite useful.

Did you know CSS lengths can be relative to font, to viewport or absolute? Here you can see and compare available units from EMs to inches, as well as those viewport related such as vh, vw, and vmax.


You can also see how the relative ones compare to the font-size of HTML and BODY.

Sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *