How do I override an html for font color to what I want?

2008-07-09 10:02 pm
Alright so I have a css thing background already I just want to change the font color to green and it's white right now I tried <font color=green> but it never worked...it was still white.

回答 (4)

2008-07-09 10:07 pm
✔ 最佳答案
The CSS would be...

color: green;

... for whatever tag, class, or id you're trying to override.
2008-07-09 10:08 pm
Remember that in CSS, the closest the information is to the object, the higher priority it has.

The FONT tag should not be used anymore. You should write this instead:

<span style="color: #0000FF">My Green Text</span>

Good luck!
2008-07-10 1:06 am
<tag name here>
{
color:#001100;
}

example:
a:link
{
color:#2B8D2B;
}

and you can control the hexadecimal value for sure.
2008-07-09 10:08 pm
I am assuming you're talking about the background color of your website. If yes, on the CSS file, you will see:

body {background: #fff;}

All you need to do is change '#fff" to the color you want. You can use the color name "green" or if you want a particular green shade, search for the HEX code of the color and enter it in with the "#"


收錄日期: 2021-05-03 14:22:22
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080709140257AAJp5Rb

檢視 Wayback Machine 備份