PDA

View Full Version : CSS question


Zachery
Sun 27th Jul '03, 3:06am
i want to add this to a CSS if its possible, this isnt vb related just figured this would be a good place to ask


<font size="+1" face="Arial"><B></b></font>

Ogden2k
Mon 28th Jul '03, 1:19pm
Easy enough:

.normfont {
font-family: arial;
font-size: +1;
font-weight: bold;
}Just add that to your external CSS file.

Then in your HTML document, just do this:<font class="normfont">text....</font>

Zachery
Mon 28th Jul '03, 1:24pm
thanks alot :D

Ogden2k
Mon 28th Jul '03, 7:40pm
NP. That should work, I did it in a hurry @ work. If it doesn't work, let me know.

Zachery
Mon 28th Jul '03, 8:07pm
NP. That should work, I did it in a hurry @ work. If it doesn't work, let me know.
ill test it out later...

:D but thx. ive been meaning to learn it

Daijoubu
Tue 29th Jul '03, 10:46am
+1?
Shouldn't it be in px or pt?

Zachery
Tue 29th Jul '03, 10:56am
i think both work as ive seen both used

Ogden2k
Tue 29th Jul '03, 12:47pm
You can use 12px or +1

Noiz Pollution
Sun 3rd Aug '03, 2:10am
Using pt or px will "hardcode" the font sizes meaning users will see them at that size regardless of their browser settings. Just so you know. :)

Marco
Mon 4th Aug '03, 6:06am
Yay for shorthand properties :D

.normfont { font: bold 12px Arial; }

Much neater ;)

Faruk
Thu 14th Aug '03, 8:20pm
Easy enough:

.normfont {
font-family: arial;
font-size: +1;
font-weight: bold;
}Just add that to your external CSS file.

Then in your HTML document, just do this:<font class="normfont">text....</font>


Rather than that, you should use <span class="normfont">{ stuff }</span>

The <font> tag has long been deprecated already, and as such you should never use it in any HTML-page anymore. The use of <div> and <span> is now the way to go.

<font> was originally a tag introduced by Netscape, but I think it's been deprecated for 3 years already, if not 5....