Convert pixels to ems – with ease

I came across a very neat, and immensely useful tool online today that converts fixed pixel sizes to their relative em size equivalents. The Em Calculator bases conversions on a specified base pixel conversion ratio, and provides you with immediate calculations for nested child and sibling nodes of the DOM tree. Big thanks to Piotr Petrus who has put this tool together.

2 comments on “Convert pixels to ems – with ease

  1. The unit of measurement is not the culprit in your differences between IE and Firefox. The most likely cause is differences in the box model used by the two browsers, which defines the position and relationships between padding and margins of elements.

    Applying a CSS global reset is a good place to start as it levels the playing field for all browsers. You can then apply your own styling to individual elements in a way that should be interpreted by browsers in the same way.

  2. I’m having a hard time figuring out how to make my websites look good on all browsers… I’ve found I can make them look good either on firefox or IE 6 but not both… is using ems the secret? I’ve been designing my sites using absolute positioning and pixels on dreamweaver. I find it a bit frustrating because it seems like things are never how they look in dreamweaver.

Leave a Reply

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