Em and pixels compared

Categories Web Tech

What’s a pixel?

How big is an em?

What about rem?

How big are they?

I sometimes have to explainn the differences between these, particularly when to use them.  I made a little demo page to help

Try this  http://is.gd/pxorem

There’s four bars that are direct children of the body, and they are repeated inside a div.  You can set the font size of the body and the div, and set the widths of each in em, rem, px and %.  It’s a bit clunky but it might help someone.

Leave a Reply

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