|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anybody explain me this css warnings ?
* Line : 20 Level : 1 You have no color with your background-color : .menu * Line : 30 Level : 1 You have no color with your background-color : .langch * Line : 42 Level : 1 You have no color with your background-color : .rightbar * Line : 56 Level : 1 You have no color with your background-color : .contents * Line : 152 Level : 1 You have no color with your background-color : .btmbtn thank you
__________________
Pupeno: pupeno@pupeno.com http://www.pupeno.com Science Fiction Readers: http://sfreaders.com.ar |
|
#2
|
|||
|
|||
|
Might be able to help.
More details requested. What causes you to get this message? |
|
#3
|
|||
|
|||
|
|
|
#4
|
|||
|
|||
|
I believe that they are warnings for if you do not specify font color in your css:
* Line : 20 Level : 1 You have no color with your background-color : .menu means no font color designation in the following portion of the example code Code:
.menu {
background-color : #c4ffff;
text-align : center;
padding-top : 2px;
padding-right : 2px;
padding-bottom : 2px;
padding-left : 2px;
}
That's just my take on it but I may be wrong because it's all speculation |
|
#5
|
|||
|
|||
|
Common practice is to assign both a color to the text if you assign a custom background color. You didn't, so the validator issues the warning.
Its not an error though, since the document is valid. But some browsers may not inherit the base text color when you override with your .menu style. This may result in the text not being visible, depending on what the client's browser is set to for default text color. Basicaly, for ever background-color: #xxxxxx;, you should also have a color: #xxxxxx; statement, even if it reproduces a color that should have been inherited from the base style. Just safe css practice. |
|
#6
|
|||
|
|||
|
^^Rapid fire responses
![]() |
|
#7
|
|||
|
|||
|
I tend to agree with MJEggertson. If this is actually the case, then it is good CSS practice to assign values to the styles you set.
|
|
#8
|
|||
|
|||
|
On the other hand however, the usual default background-color is #ffffff. If you do not specify a color to be employed, whether it be for the background, or for the fonts used, or for anything else for that matter, the browser should automatically display the default color(s). With that in mind, i do not follow why you would recieve the message that you did/do. Interesting quandry.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > css warning |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|