View Single Post
  #3 (permalink)  
Old 10-17-2008, 01:44 PM
Dubbya's Avatar
Dubbya Dubbya is offline
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,300
Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4
Default Re: what happens if css does not find the fonts on my PC

If you're using CSS to specify the font face, and you should be, you should always specify several fonts at once and you can specify different font's for every page element, id or class. For example, the <body>, <p>, <h1>, <td>, <div>, the list goes on.

This way, if the user does not have the first specified font installed, the browser will default to the next system font in the list.

Here's how:

(In your CSS stylesheet)
HTML Code:
body{font:76% arial,helvetica,verdana; color:#000;}
Alternatively, you can apply different styles to each element like this:
HTML Code:
div#content {
	font-family:arial, helvetica, verdana, tahoma;
 	color:#D2D5D8;
 	font-size:1.3em;
	font-weight:normal;

p {font-family: "Courier New", Courier, monospace; }
As you can see, you have a lot of flexibility. A word to the wise though, try never to specify comic-sans, script or brush fonts that your users probably won't have installed and that are difficult to read anyway.

For more information regarding CSS Styles, visit the W3C page at:

CSS Tutorial

Enjoy!
Reply With Quote