spyke01 Posted July 23, 2006 Share Posted July 23, 2006 i am redesigning my current site with more css and JS, and wanted to see what the big difference is between ems and pxs. is there a way to make 1em=1px? the reason i ask is because i like the control i have with pxs, if i cant make them the same, or its not a good idea, then can someone help me with this:Ok we have this box:+----+----------+| | || | || | |+----+----------+It is 900px wide, the left column is 200px and the right 700px, we want 2px padding all the way around, so our css is like this:[code]#box { width: 900px; padding: 0px; margin: 0px;}#left-col { width: 196px; padding: 2px;}#right-col { width: 696px; padding: 2px;}[/code]how does this relate in terms to ems if our default text is this:[code]body { font-family: Helvetica, Tahoma, Verdana, Arial, sans-serif; font-size: 12px;}[/code] Link to comment https://forums.phpfreaks.com/topic/15378-ems-vs-pxs/ Share on other sites More sharing options...
AndyB Posted July 23, 2006 Share Posted July 23, 2006 http://www.clagnut.com/blog/348/ explains in considerable detail as well as addressing your (type) of problem. One em is the width of the letter M (hence the name). Link to comment https://forums.phpfreaks.com/topic/15378-ems-vs-pxs/#findComment-62339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.