RE: pt vs px for font sizes.

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
like:

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

applied to HTML reading:

<table>
 <tr>
  <td>
   This is table text.
    <p>
     This is paragraph text.
    </p>
  </td>
 </tr>
</table>

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!

	Tom

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