What are the advantages of using ems instead of % in CSS?

css, font-size

Solution

For font sizes:

- em and % are both relative to the font size of the parent element (i.e. 2em and 200% always give same result)

- ems have a history in typography (although a CSS em is not the same as a typographic em)

- Browser implementations of CSS have fewer bugs with % than with em

For everything else (e.g. the width of an element):

- em is relative to the font size

- % is relative to the parent element

… so they do completely different things and need to be considered on a case by case basis.

Problem

I understand the advantages of using ems in favor of static measurements like pixels and points, but why do most of the CSS people out there (SO excepted) prefer using ems instead of % values?

Original source