Topic: CSS - Set default font (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10761" title="Pages that link to Topic: CSS - Set default font (Page 1 of 1)" rel="nofollow" >Topic: CSS - Set default font <span class="small">(Page 1 of 1)</span>\

 
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 06-22-2002 20:53

How can you set default font-family for the entire web page? I'd like to set the default font, so that my H1, P, A... assignments all inherit this font value.

Is it:

FONT {
font-family: ... ;
}

Thanks, Karl

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 06-22-2002 21:06

You're close, but not quite there Try this:

h1, p, a, body {
font-family: ...;
}

You can seperate HTML tags and elements using commas and they will follow any properties defined within that block.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 06-22-2002 21:17

Err... my only complaint is:
That I have to implicitly set the default for each of these tags... I mean, I like the soluition and I can see using it for many many things. However, is there another way? A top level assignment?

Karl

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-22-2002 21:22

A top level assignment. Absolutely:

body {
font-family:...
...and whatever else...
}

Some older browsers have bugs that the styles won't cascade down into tables, so you might have to do this:

body, td {
...
}

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 06-22-2002 21:23

The 'top level' to which you can assign the font settings is the body tag. With

body { font-family: Verdana; }

all your page's text should appear in Verdana and does in all newer browsers. However, Netscape 4.x messes things up quite a bit, and if you want everything to look fine there as well, you'll have to add tags like td and p to be sure that the text they contain is really displayed in Verdana.

edit: Bah, too late again!

kuckus (cell #282)

[This message has been edited by kuckus (edited 06-22-2002).]

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 06-22-2002 21:45

body{}! "Duhh!"

...and thanks for advice on tables, td's, etc..

Karl



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu