CSS Tool: Pixel to Em Converter

Here is a useful CSS tool that converts size in pixels to relative em units, which are based on a text size.

In case if you do not know what is em, here is a nice article about the difference between using pixels for the text size and em.

Why not px?

The most important thing to keep in mind is that opposed to pixel units, em units are relative to the font size of parent elements. If you take a step back and look at it, everything boils down to the font size of the browser itself – essentially giving the developer no control of the font size of their document. Read full article.



5 Comments on "CSS Tool: Pixel to Em Converter"

  1. Jimmy says:

    Ades,

    Very useful tool. Thanks!

  2. Anthony says:

    Cool tool bro, you’re full of them!

  3. Robert Nesta says:

    Another useful tool is:
    http://www.dieterschnee.com/home/px2emconverter

    This takes whole stylesheets/HTML-pages and converts all Pixel values to em.

  4. Electricspace says:

    For those who want to work with em’s: I’ve written a simple program in .NET to a pixel size to em. I use it in my day-to-day work:

    You can download the program “Pixel 2 em calculator” from http://electricspace.blogspot.com/2009/02/pixel-2-em-calculator.html

  5. Faydaliweb says:

    Em is most useful and user friendly than px

Got something to say? Go for it!