Forum Moderators: not2easy
/* One declaration */
background:transparent url(path/to/image.gif) repeat-x top left;
/* Several declarations */
background-color:transparent;
background-image:url(path/to/image.gif);
background-position:top left;
background-repeat:repeat-x;
-B
Line : 71 (Level : 1) You have no background-color with your color : .style41
Line : 76 (Level : 1) You have no background-color with your color : .style42
Line : 79 (Level : 1) You have no background-color with your color : .style45
Line : 84 (Level : 1) You have no background-color with your color : .style46
That is the error the validator gives me. And here is my code snippet for that first line to give an example.
.style41 {
font-size: 36px;
color: #003366;
background-color: transparent;
}
.style42 {
font-size: 18px;
color: #003366;
}
.style45 {
color: #003366;
font-family: Arial, Helvetica, sans-serif;
}
.style46 {
font-size: 24px;
color: #003366;
font-family: Arial, Helvetica, sans-serif;
}
so as you see, adding the background color keyword 'transparent' doesn't help a bit. It wants a background color and I need to know how to get past that so that I can have text color and no background.
Line : 71 (Level : 1) You have no background-color with your color : .style41
Line : 76 (Level : 1) You have no background-color with your color : .style42
Line : 79 (Level : 1) You have no background-color with your color : .style45
Line : 84 (Level : 1) You have no background-color with your color : .style46That is the error the validator gives me
Look more closely: those are warnings, not errors.
The validator is simply advising you that there is the potential for a problem with the given lines in the stylesheet (i.e. that by not specifying a background color you may accidentally cause some or all of the text styled by the css in question to be unreadable). If you're confident the warning doesn't apply in any particular case, just ignore it.
-B