I cheated on a small site I was working on and used a site builder (Web Dwarf by Virtual Mechanics) to save time. I didn't realize it at the time, but this builder specifies the width, height and positions using CSS EMs.

Is there an automated tool out there that will read through the CSS and convert each EM to a percentage so it will display correctly on wide screens as well?

Any help would be great! Thanks.

Here is the CSS:


  • This question should be asked in <a href="stackoverflow.com/">Stack Overflow</a> for better results in case your question was not answered. Feb 14, 2011 at 19:30

2 Answers 2


A CSS em is calculated based on the size of the font you are using, so conversion to some arbitrary percentage value isn't something you can automate. If you wanted you could do some simple percentage calculations of your own by dividing your container element's EM width by the widths of subelements and so-on, but there is no way for an automated tool to do this sort of job.

  • I added the CSS code to the post above. Maybe you could look over it and tell me exactly what to do?
    – Zac Brown
    Jan 21, 2011 at 2:24
  • Maybe if I saw the full web page somewhere I could help you better. Without HTML code I'm just guessing at what each of the #Oobj IDs contain. As it is, I would divide every width: and left: value by the largest width+left value (which is 98.7 I believe), then multiply that by 100 to calculate percentage. So: left: 82.10em; width: 6.10em becomes left: 83.18%; width: 6.18% Overall though I think this approach will look strange, I'd recommend learning HTML/CSS and going through this yourself to make sure it looks right.
    – Just Jake
    Jan 21, 2011 at 6:16

Try to use this tool. You need to paste your css code and it automatically convert to em, px, % or pt. But be careful, this tool has some limitations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.