Em and pixels compared

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 *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

comment