View Full Version : slight problem with CSS code

17 Dec 2005, 04:58 AM
hi hope someone can help...

im trying to validate my stylesheet using the CSS validation service at w3org.com

There is a problem with the following style:

font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #ff0000;
text-decoration: none;
font-weight: bold;

The error says the following:

Line : 73 (Level : 1) You have no background-color with your color: .bodyred14veranda

Therefore, i added the following to the above style:

background-color: #ffffff to make the background colour of the text white and this did solve the css problem but caused another.....

The table that the text with the above style was in had a blue background but because the background of the text was now set to white the background of the table became white which i did not want.

So basically, is there a way in which to set the background of the text in CSS to transparent??? i also tried this code:

background-color: none; but that didnt work and came up with the error below:

Invalid number: background-color none is not a color value : none


17 Dec 2005, 02:55 PM
The thing about color and background color is a "warning" not an "error". Warnings should be noted but you can ignore them and still have valid code. You can set background-color:transparent; if you want.