W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2002

RE: pt vs px for font sizes.

From: Tom James <tom.james@digitext.com>
Date: Tue, 10 Sep 2002 15:16:54 +0100
Message-ID: <BB503C6DCB3BD411A94C00E07D81D64B324C43@NTSERVER2>
To: "'w3c-wai-ig@w3.org'" <w3c-wai-ig@w3.org>

Steve Vosloo wrote ...

> EM or % is the way to go.
> A warning though -- I had a weird situation where I used both of these
> and when I applied it to text in a nested table the value doubled.
> Example, some text that was set to 80% of normal size (through CSS)
> suddenly became half as small when inside the nested table.

You sometimes get multiplactive effects in tables: for example, a stylesheet

td	{font-size: 80%;}
p	{font-size: 80%;}

applied to HTML reading:

   This is table text.
     This is paragraph text.

Results in the "table" text being 80% of the normal size but the "paragraph"
text being 64% (i.e. 80% x 80%).

As was alluded to earlier on a different thread, modern browsers also
sometimes run in "strict" or "quirks" mode with respect CSS depending on the
DOCTYPE you select. In the case of at least MSIE5.5 / MSIE6 on Windows, this
further complicates the sizing issue of text, particularly within tables. 

In these situations, I am generally inclined to "leave well alone" with
regard font sizes, as the whole area rapidly spirals into deep complexities
when tring to get a cross-platform, cross-browser, resizeable solution. But
if you do want to control your font sizes more precisely, use ems or % but
test ultra-thoroughly!


Dr Tom James
Senior Consultant

Digitext - Online Information at Work

Telephone: +44 (0)1844 214690
Fax: +44 (0)1844 213434
Email: tom.james@digitext.com
Web: http://www.digitext.com/

Received on Tuesday, 10 September 2002 10:15:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:11 UTC