gsingh2011 Posted February 22, 2010 Share Posted February 22, 2010 Is it generally better to use em instead of px for positioning elements? Why or why not? Link to comment Share on other sites More sharing options...
jeffman Posted February 22, 2010 Share Posted February 22, 2010 It depends on your goal. An em unit is proportionate to the size of the font being used in an element. If you change the font size, then things like line height and paragraph margins will shrink or grow in proportion.But sometimes a design requires exact units. If three divs need to fit into an 800px space, they need to be defined in px. I generally prefer margins and padding defined in px so that they always look the same. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.