validation css

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all

what the validate mean by

a.. Line : 0 font-family: You are encouraged to offer a generic family
as a last alternative

Re: validation css

Quoted text here. Click to load it

When you list a set of fonts, eg
font-family: "My Cool Font", Arial, Helvetica, Verdana;

you are encouraged, but by no means required, to end the list with one
of the generic font families:
serif; sans-serif; monospace; cursive; or fantasy

These do not refer to any particular font but to groups of fonts with
similar properties. In the above example the three real fonts are all
sans-serif fonts so we'll assume that My Cool Font is as well and add
sans-serif to the end of the list:
font-family: "My Cool Font", Arial, Helvetica, Verdana, sans-serif;
Now if a browser doesn't have any of the four named fonts it will use
whatever font it does have access to that does belong to the general
type of sans-serif thus preserving some element of the author's
suggested appearance.


However there are browser bugs (some older versions of IE sometimes
screw up on serif) and the default choices for some of the families in
some browsers aren't brilliant so whether you choose to follow this
idea or not is up to you.


"My theories appal you, my heresies outrage you,
 I never answer letters and you don't like my tie."  - The Doctor

Re: validation css

Quoted text here. Click to load it

How do I know which fonts are generic family
Any way this work fine thanks


Re: validation css

steve said:

Quoted text here. Click to load it

you cant know as the user determines the font they want for each family
unless they leave the fonts at the browser defaults and you cant know if
they've done that either.

if you specify (e.g) font-family:cursive; then you get the look you want
but the actual cursive font used is left up to the visitor  the font may
or may not be the same as the one you use but it doesn't matter as the
visitor get the font they prefer while you keep the look you want.
(if they have a cursive font specified for the cursive generic family).

30/November/2003 07:30:48 am

Re: validation css

Quoted text here. Click to load it


Yay, Brucie! Welcome back! You had us worried...


Nigel Moss.

Email address is not valid. Take the dog out! | Boycott E$$O!!
In the land of the blind, the one-eyed man is very, very busy!

Site Timeline