Quote:
|
Originally Posted by ozchris
Do you personally usually worry about the non-error warnings from css validation - re background colours, spare fonts etc? I guess it depends on whether I want to be a perfectionist or not.
|
Usually, I don't worry. But as I typed this response, I got an idea.
These warnings occur because we habitually don't specify a background color when the background color of an ancestor element is used. So we can cover that issue by extending the "global whitespace reset" (which is a good idea to start your CSS with) to include background colors:
Code:
* {padding: 0; margin: 0; background-color: transparent;}
This might solve it - I have to check this.
UPDATE: It does not work as intended. Don't get me wrong,
on the CSS level it works perfectly. The validator just does not recognize it ...
But it seems to be a validator issue - I noticed that the W3C CSS validator sometimes does not work correctly, it warned about elements without background-color where in fact the background-color was explicitely declared.
So we have a solution, you just can't validate it. So what.
Regarding the question of "spare fonts", you should always declare several fallback fonts. Like
Code:
font-family: yourfancyfont, arial, helvetica, sans-serif;
for non-serif fonts.
faglork