Search code examples
cssmeasurement

Measurement on a web site


Should you mix em with px?

As em is based on font size and px is based on the screen.

So the question boils does to - how to generate an image when most of the web site is using em ?


Solution

  • Fonts are designed to be used in an array of sizes; thus font engines have no problem scaling them up/down with precision; however, images have always used a rigid measurement (regardless of unit). Consequently, resizing them tends to F them up -- sometimes a litte, sometimes a lot. This is especially true when the browser is doing the resizing. Browsers weren't designed as photo-editing tools.

    If you're building image-based menus, and you're also allowing the menu to scale upward in size, maybe a redesign is in order. If not a redesign, than perhaps an elimination of one factor (no scaling, or no images).