Using Pixels or Ems in Your Web Designs
Q:What is the practical difference between px (pixel) and em (pronounced m)? When is it best to use one over the other?
The short answer is that pixels measure dimensions relative to the screen while ems measure dimensions relative to type size.
The slightly longer answer is that pixels are the natural unit for measuring dimensions on a screen and are often used when precise deign is required. Ems are the natural unit for measuring type and used when you want to allow maximum design flexibility.
The carpenter’s adage goes “measure twice, cut once,” but carpenters deal with the physical universe where a board always stays the same length once it has been put into place. Many designers want to define with exact precision the placement and size of elements, similar to the way they might design for print or video. Those medium are static, even video, which might move and be projected on to larger screens, but the aspect ratio does not change so everything is scaled relatively. However, on the Web, you are dealing with a variable canvas, with its final size dependent on the whims of the viewer.
Read the Full Article on Peachpit.com »
Discussion Area - Leave a Comment