CHI-WEB Archives

ACM SIGCHI WWW Human Factors (Open Discussion)

CHI-WEB@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stewart Butterfield <[log in to unmask]>
Reply To:
Stewart Butterfield <[log in to unmask]>
Date:
Tue, 6 Jun 2000 02:08:22 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
At 05:45 PM 6/5/00 -0400, Leslie Carter, Ph.D. wrote:
>Has anyone found a good solution for specifying font sizes for web pages
>that are viewed by all browsers?
>
>The old Font size tag is deprecated in HTML 4.  Relative measures (e.g.,
>larger, em) can cause unexpected cumulative changes depending on page
>structure.  The em units so highly regarded by the W3C won't work for my
>IE5 & are widely known not to work in IE3 or less.  Absolute measures
>(e.g., pixels) can't be re-sized by the user.
>
>Is there really any solution other than using heading tags which, of
>course, is not what they are really intended for?


Use relative measures ("em" is included in that) and structure your 
documents carefully. You can avoid unexpected results by paying attention 
to the cascade structure (as implemented in each browser). Of course, very 
reasonable specifications will look too small or too large in certain 
browser/platform combinations.

Unfortunately, at the moment, using a script which serves different 
stylesheets to different browsers is still the best solution. There are two 
ways to do this: (i) server-side, where the user-agent strings associated 
with http requests from a browser are parsed by a script or servlet which 
decides how to fill in an include statement (with some "<LINK 
REL=stylesheet HREF="some_browser_specific.css" TYPE="text/css">") or 
embedded style information, and (ii) client-side, where javascript (etc.) 
does basically the same thing but while/after the page has loaded.

Server-side detection is better in the sense of generally being faster 
(unless your server is bogged down) and more reliable but since most 
css-capable browsers are also javascript-capable, client side detection 
usually works. The hard part (or at least the time consuming part) is the 
creation of the various versions of the stylesheet:

(1) Create a stylesheet to suit whatever browser/platform you use. Do not 
use inline styles (put all the style information in a single file or all 
together in the head). Keep in mind which properties are supported in which 
combinations (http://www.webreview.com/pub/guides/style/mastergrid.html) so 
you don't end up dependent on some browser-specific property. Don't proceed 
to step two until you are happy with what you have, since you don't want to 
be change five versions every time you want to lighted a color, etc.
(2) Try it out on other browsers/platforms and modify as necessary, 
creating a new version of the stylesheet whenever you are unable to get a 
workable document with the original (usually Mac/Win-IE/NN will do it, 
though UNIX users have special needs, font-wise).
(3) Repeat (2) until you are sick of doing it, or get however close to 
universality as you need to (90%? 99%?)

Do it right and at the end, every browser will receive

For more information:

Todd Fahrner's http://style.verso.com/
and
WebMonkey: 
http://hotwired.lycos.com/webmonkey/98/35/index2a_page5.html?tw=authoring

(Note that both of these are a few years old -- plus ša change.)

Of course, you could also just continue to use font tags . . .

Good luck,

Stewart

ATOM RSS1 RSS2