Style Sheets & Body Text

Bob Duncan duncanr at lafvax.lafayette.edu
Sun Dec 7 17:20:09 EST 1997


At 07:03 PM 12/6/97, Elizabeth Hamilton wrote:
>I want to specify that all headings be a sans serif 
>font and that all body text be the same. I have placed 
>the following markup inside the <HEAD> tags.
>
><style>
><!--
>    H1, H2, H3, H4, H5, H6 {font-family: "Arial", sans serif }
>
>    BODY { font-family: "Arial", sans serif }
>
>-->
></style>
>
>Am I doing anything wrong or is there a bug in Comm. 4.01?

No "bug" (regarding this) that I'm aware of, but I do see a couple of
problems:

	1) There needs to be a hyphen in sans-serif.
	2) If this isn't the entirety of your declarations, e.g, if you're
assigning other properties, such as color, in the same declaration, make
sure you have a semi-colon at the end of each declaration.
	3) Not really a problem, but Hx tags inherit from BODY, so there's no need
to define each one unless you want a property different than that (those)
in the BODY.
	4) No need to enclose Arial in quotes (multi-word fonts require them), but
this shouldn't matter with how browsers render.
	
As to why it "works" in IE3 but not NC4, any chance you're using a Mac?
Since Arial doesn't exist on most Macs, NC4 would ignore "Arial" as well as
the missing hyphen, and render all in serif, but IE3 might be buggy enough
with the font-family property (a known problem) to ignore the lack of a
hyphen, thus rendering all as sans-serif? (Just a guess.)

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