Ninjakreborn Posted October 13, 2006 Share Posted October 13, 2006 I have a certain number of pixels, say I want to decide how many em's that is instead, is there a way for me to calculate that? Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/ Share on other sites More sharing options...
jcombs_31 Posted October 13, 2006 Share Posted October 13, 2006 what would be the point, they are different sets of measurements for a reason. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108399 Share on other sites More sharing options...
Ninjakreborn Posted October 13, 2006 Author Share Posted October 13, 2006 I have an image that is done in pixels, the photoshop file is in pixel's, I am trying my hand at a layout using mostly em's, the pictures have to remain closely the same sizes. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108403 Share on other sites More sharing options...
wildteen88 Posted October 13, 2006 Share Posted October 13, 2006 1em is about 16pixels. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108404 Share on other sites More sharing options...
jcombs_31 Posted October 13, 2006 Share Posted October 13, 2006 If you are trying to make something pixel peferct, than use pixels, that's why they are a form of measurement. Use ems where appropriate. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108449 Share on other sites More sharing options...
Daniel0 Posted October 13, 2006 Share Posted October 13, 2006 Use percentages instead. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108465 Share on other sites More sharing options...
jcombs_31 Posted October 13, 2006 Share Posted October 13, 2006 you guys completely defy logic. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108495 Share on other sites More sharing options...
ober Posted October 13, 2006 Share Posted October 13, 2006 Agreed. Use the appropriate measurement. End of story. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108511 Share on other sites More sharing options...
effigy Posted October 13, 2006 Share Posted October 13, 2006 An em is the size of the font, therefore it can change. A pixel does not. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108580 Share on other sites More sharing options...
Ninjakreborn Posted October 13, 2006 Author Share Posted October 13, 2006 Ok, which measurements, should be used for which types of elements. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108583 Share on other sites More sharing options...
redbullmarky Posted October 13, 2006 Share Posted October 13, 2006 specifically, and hopefully to draw the curtains down, 'em' is the width (in pixels) of the letter 'M' (caps) for the particular font you're using, hence them name 'em'. so as stated by effigy, it changes with the font.[b]edit:[/b] in response to your post whilst i was typing mine - i've personally never used anything other than pixels and percentages. as for the others? i guess i'll know when to use them when i get to that stage. Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108586 Share on other sites More sharing options...
AndyB Posted October 13, 2006 Share Posted October 13, 2006 Read it all. Learn a lot. -> http://clagnut.com/blog/348/ Quote Link to comment https://forums.phpfreaks.com/topic/23857-calculating-the-difference-in-ems-and-pxs/#findComment-108659 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.