Convert ems to pixels

Hi folks,

How does one convert em to pixel?  I just inherited a site where EVERYTHING (down to the div widths) is specified in em and I have no frame of reference.  
LVL 70
Jason C. LevineNo oneAsked:
Who is Participating?
 
koolieCommented:
em's are based on how the user has there font size configured.  Since most dont even know about this, you can generally assume that the default is what they use.

Here is a good site that gives you approximations on what is correct.

http://www.reeddesign.co.uk/test/points-pixels.html

em's are an ideal way to design since it is relative, but a little tough if you get thrown right into it.  Good luck.
0
 
jeaton32Commented:
Hi jason1178,

FAQTs.com
http://www.faqts.com/knowledge_base/view.phtml/aid/19491



Hope this helps!

Josh
0
 
Jason C. LevineNo oneAuthor Commented:
Hi koolie, Josh,

Thanks for the links.  The first one generalizes 1em = 12px and the second provides a mathematical formula that produces a variable result based on the user.

If I just wanted to blow the ems completely out of the document and replace with px, which resource should I use?
0
 
jeaton32Commented:
Unless you can create a program to parse your HTML file and convert all the ems to px, then I do not know of a better way besides doing a find-replace and manually entering in your conversions. I'm sorry I do not know enough to code a program that will do this.

I've looked and can't find anything that will do this automatically for you, hopefully someone else can find or code something.
0
 
Jason C. LevineNo oneAuthor Commented:
Okay, thanks guys.  I have enough info to go from here.

Points split as you both posted valid solutions within 3 minutes of each other.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.