Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert ems to pixels

Posted on 2006-07-19
5
Medium Priority
?
2,735 Views
Last Modified: 2012-06-22
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.  
0
Comment
Question by:Jason C. Levine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
koolie earned 500 total points
ID: 17141378
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
 
LVL 3

Assisted Solution

by:jeaton32
jeaton32 earned 500 total points
ID: 17141394
Hi jason1178,

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



Hope this helps!

Josh
0
 
LVL 70

Author Comment

by:Jason C. Levine
ID: 17141434
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
 
LVL 3

Expert Comment

by:jeaton32
ID: 17141789
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
 
LVL 70

Author Comment

by:Jason C. Levine
ID: 17142009
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question