Forum Moderators: not2easy

Message Too Old, No Replies

Generic font-family?

         

gasell

11:06 am on Dec 28, 2004 (gmt 0)

10+ Year Member



My stylesheet validates but I get warning: You are encouraged to offer a generic family as a last alternative.
I have verdana set as font, which fonts should I add?

Longhaired Genius

11:20 am on Dec 28, 2004 (gmt 0)

10+ Year Member



The generic font names are serif, sans-serif, cursive, fantasy, and monospace. If your first choice is verdana you should add sans-serif.

gasell

11:59 am on Dec 28, 2004 (gmt 0)

10+ Year Member



I should add sans-serif font? I tried adding arial but that didn't do it.

SuzyUK

12:59 pm on Dec 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I should add sans-serif font

Yes the actual words "sans-serif"

when you specify a list of fonts in your CSS.. e.g.
{font-family: verdana, tahoma, arial;}

You are offering/suggesting to the browser/UA a choice of which font to use.. if it doesn't have any of the specified fonts installed it needs to know which "generic" family you would like to display which will then be based on the users preference for that family. In this case they all belong to the "sans-serif" family so the list of choices should be:

{font-family: verdana, tahoma, arial, sans-serif;}

gasell

2:06 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



Thank you so much!