Click to See Complete Forum and Search --> : Font Styles


r1012
01-20-2003, 12:46 PM
dumb question but I can not get my web page to appear in Arial without putting "font face=arial" in each line of code. Isn't there an easier way to have the text on a page appear in a particular font unless you change it at a specific spot?

I do not use style sheets and thought you could do the above within the body tags but it will not work for me. Should I use "font style="" instead???

pyro
01-20-2003, 12:54 PM
What you should do is use a stylesheet. Insert this into your <head>

<style type="text/css">
body
{
font-size: 10pt;
font-weight: normal;
font-family: Arial;
}
</style>

This should change the default to 10pt Arial...

Charles
01-20-2003, 01:18 PM
1 - You should never use points for anything that goes to the screen. Screens work with pixels and browsers simply do not know how many pixels a screen has to the inch. They just guess. Instead use pixels, or better yet, leave the sizes the way the user wants or needs.
2 - You should always specify a default, generic font-family. Id est: font-family:Ariel, sans-serif

r1012
01-20-2003, 05:45 PM
Ok lt m get this straight.

Pyro your saying I should use a style sheet even though my web site has no style sheets any where in it? Also doesn't this creat problems with browsers other tan IE (for xample NetScape)??

Charles I understand the part about points versus pixels and I prsume " font-family:Ariel, sans-serif " has to be insterted into the <style> </style> tags some where. Is this correct?

r1012
01-20-2003, 06:02 PM
Charl3es thanks I re read your reply and figured out what you here saying about the "font-family: ariel, ....."

Is there a scale for font sizes versuses pixels? I mean does 10 pixels = font 4 in html?

Stefan
01-20-2003, 07:32 PM
Originally posted by r1012
Is there a scale for font sizes versuses pixels? I mean does 10 pixels = font 4 in html?

There is no such exact scale becuase they are implemented in different manners in different browsers. A browser will usally fall into one of the following cathegories.

* A pre CSS browser ("random" scale value)
* A CSS1 browser (1.5 x scale between each size keyword)
* A CSS2 browser (1.2x scale between each size keyword)

In short, don't bother with trying to figure out the scalevalue, it won't work cross OS/browser anyway.
In stead use % for font-size, leaving the main text of the page at size 100% and just set the size of things you want smaller or larger then the main text.