Andrew Johns <> quoted:

> "In reality, the usefulness of the em unit has been betrayed by the
> prevalence of CSS implementations that fail to let font sizes (and
> random selections of other properties) inherit per spec into [...] tables.

It's annoying, but it doesn't mean ems are unusable, you just have
to know how to work around it.

If you don't care about Netscape 4, all you need do is add the rule:

  table { font-size: 1em; }

which will fix all other browsers.

If N4 is an issue, you need to make sure a non-default font-size is
never set on a parent of a table, so the N4 bug never makes any
difference. This can be done by applying font-size only to the
bottom-level text elements, eg. <div class="content">, instead of
on high-level elements like <body>. If you don't have complicated
nested tables, applying the styles to the <td>s directly is doable too.

Another approach is to reset the font size to default around tables
and then style their cells:

  <div class="table"><table>

 .table { font-size: medium; }
 td { font-size: XXX%; }

(IE/Win-Quirks and Opera get the size of 'medium' wrong but that
does not matter as they also emulate the N4 inheritance bug.)

Another possibility is to serve N4 only with fixed fonts using an
exclusion hack, and use the easy fix for the other browsers:

  body { font-size: 90%; }
  table { font-size: 1em; }
  /*/*/ /*/ th, td { font-size: 12px; } /* N4 only */

(Of course the best long-term solution is not to use tables for

> All released versions of Netscape mess it up, for instance

N6+ are fine with inheritance.

> even in the latest version of Explorer for Windows (5.5 beta)

The latest version of IE/Win is now 6. It fixes the inheritance problem when
you use 'Standards Mode' by putting a full DOCTYPE at the start of
the page. Otherwise any of the fixes above work.

> Is there any alternative to using ems, if you NEED to have scalable
> fonts?

There's %. It has the same inheritance problems as 'em', but seems
to behave slightly more accurately in IE/Win when the user has set
text size to a non-default value. (IE sometimes seems to scale the
em more than it should.)

> What is the reason behind not using pts?

The CSS 'physical units' are supposed to appear as a fixed length
(eg. 10cm) regardless of the device on which they are displayed. However,
today's computers have no way of telling how big the screens to which
they are connected are, so the operating system guesses an arbitrary
length. 'px' yields a more reliable result for now.