style sheet font-size, was RE: different browsers

Bob Duncan duncanr at lafvax.lafayette.edu
Wed Dec 10 18:21:19 EST 1997


At 11:16 AM 12/10/97, Thomas Dowling wrote:
>True, it is possible to abuse stylesheets for really atrocious results.
>I've seen a couple of stylesheet style guides, and they recommend setting
>font sizes and margins on a relative basis, so that they can work with the
>user's settings rather than against them.  That is:
>
>  .big {font-size: 150%}      -OR-
>  .big {font-size: x-large}
>
>Rather than:
>
>  .big {font-size: 14pt}

The relative recommendation is a sound one, however, "x-large" (along with
xx-small, x-small, small, medium, large, and xx-large) is considered an
*absolute* size, not a relative size, and text declared with this value is
unaffected by a user's preferences. The relative values are "larger" and
"smaller" as well as "%", "em", and "x"; text with these values will adjust
size according to a user's preferences. (At least that's how they
tested...today...in my browser...with my OS...on my monitor...)
See the CSS2 working draft
(http://www.w3.org/TR/WD-CSS2/fonts.html#h-14.2.4) or the CSS1
recommendation (http://www.w3.org/TR/REC-CSS1#font-size) for the dirty
details.

Bob Duncan

  ~'~'~'~'~'~'~'~'~'~'~'~'~'~'~'~'~
  Robert E. Duncan
  Reference/Instruction Librarian
  David Bishop Skillman Library
  Lafayette College
  Easton, PA  18042
  duncanr at lafayette.edu
  http://www.lafayette.edu/faculty/duncanr/


More information about the Web4lib mailing list