PDA

View Full Version : Use of ems for dimensions


dubaco
05-20-2009, 09:07 AM
Hi

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

d

domedia
05-20-2009, 05: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.

DWcourse
05-21-2009, 02: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.