Click to See Complete Forum and Search --> : A certain font for entire page


Duke Will
07-30-2003, 10:45 AM
I am currently using this to do an Arial font on the whole page (thanks to someone on here that told me)...

<style type="text/css">
<!--
body {font-family:Arial, sans-serif}
-->
</style>

But I saw a page with this font...

<font face="Trebuchet MS" size="2">

...and I like the way it looks. I guess it would be okay if I changed it? (From a webmastering point... I assume my designating the font is okay with surfers.) So, how should I write that? Or is it "bad" to do this?

pyro
07-30-2003, 10:49 AM
If you are going to use it, just add it before your Arial and sans-serif fonts, that way those can be used as backups, for those who do not have the Trebuchet MS font installed:

<style type="text/css">
body {
font-family: Trebuchet MS, Arial, sans-serif;
}
</style>

CyCo
07-30-2003, 10:51 AM
<style type="text/css">
<!--
body {font-family:trebuchet ms, Arial, sans-serif}
-->
</style>

toicontien
07-30-2003, 01:39 PM
It actually should be:

<style type="text/css">
<!--
body { font-family: "Trebuchet MS", Arial, Sans-serif; }
-->
</style>

When writing a multi-word value in a style definition, as Trebuchet MS is, you need to encase the value in quotation marks.

You may even want to throw in the Helvetica font after the Arial font. Many Macs don't have Arial installed but have Helvetica.

More info on CSS:

http://www.w3schools.com/css/

pyro
07-30-2003, 01:46 PM
Ah yes, you are correct: http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop Thanks for pointing that out!