[thelist] css specs for font sizes (was: table widths, td widths)

shawn allen shawn at alterior.net
Fri Oct 18 17:37:01 CDT 2002

quoth Raymond Camden:
> > Looks good. I'll refrain from making any comments on the absolute
> > font-size ;) As for the width stuff, I would recommend using the
> > good 'ol (and rarely used or appreciated) colgroup and col elements:
> Actually, be my guest - what is wrong with the absolute font size?

The problem is (as with many others) specific to IE on Windows. If you
specify font sizes in px, it won't be able to scale them. It's
considered by some to be a serious accessibility issue that applies
*only* to the most popular browser out there. :\

What I've found the most scalable lately has been specifying the "base"
size (i.e., for the body element, and any others that buggy UA's may not
cascade to) with one of the font-size keywords: xx-small, x-small,
small, medium, large, x-large, or xx-large ("medium" should represent
the user's default size). Then, you can use relative measurements for
the rest of your specs. For example:

body { font-size: small; }
h1 { font-size: 150%; }
dt { font-size: 1.2em; }
th { font-size: larger; }

The drawbacks? It does give you a *little* less control over specific
font sizes (if you want that, the closest you'll get is with
percentages). Furthermore, there are a lot of users out there that don't
even know the text resizing feature exists in their browser (or worse,
they've tried to use it before on a site with absolute font sizes and
just given up!). Windows users will probably tell you your text is
either too small or (more likely, since the default size for most
browsers is pretty large) too big. Check out the css-discuss wiki for
more info: <http://css-discuss.incutio.com/?page=FontSize>

shawn allen
  e: shawn at alterior.net
  p: 415 577 3961
  im: shawnpallen

More information about the thelist mailing list