View Full Version : Use of ems for dimensions

05-20-2009, 08:07 AM

Probably an easy one this.

I have found plenty on the use of ems for font size but am really struggling to find anything to read and digest about the use of ems for others sizes. ie div widths, padding, margins, etc. and their relative merits over pixels.

Can someone please point me in the right direction?

Many thanks


05-20-2009, 04:35 PM
They're relative, which is the whole difference over pixels. So all sizes etc on the website will be decided by the font size the browser is using.

05-21-2009, 01:40 AM
Since images are sized using pixels and monitor sizes are measured in pixels, I use pixels for the dimensions of things like divs, etc. I'm trying to use ems for type now days (partly for accessibility reasons) but I "cheat" sometimes with pixels where spacing is critical.