| Is complete W3C CSS validation important? or can the "no background colour specified" errors be ignored ... |
vmaster

msg:1199968 | 4:56 pm on Mar 12, 2003 (gmt 0) | When I use W3C's css validator, the only errors, or rather warnings, I receive are those relating to "no background colour specified" etc. Is it really important to specify transparent background colour for each element - I've been avoiding it to keep the css file size at a minimum.
|
DrDoc

msg:1199969 | 5:01 pm on Mar 12, 2003 (gmt 0) | The reason why you're "supposed to" always specify both, even if it is redundant, is in case someone set their own local CSS file. For example, say that some "blockheaded Bracegirdle from Hardbottle" specified black as their background color, and as the only CSS rule on their local machine. Well, you can guess what most Web sites would look like. ;)
|
WibbleWobble

msg:1199970 | 5:02 pm on Mar 12, 2003 (gmt 0) | Most browsers can render background inheritance correctly, I can't think of one that does. Its good practice, if you're someone concerned about accessibility and validation; otherwise its often quite omittable, IMO. There's no strict line on it really, after all, its only a warning, not an error. FYI, if I'm building a site from the ground up, I do try to have colour and background color styles for relevant elements, but for existing sites its often too big a chore.
|
grahamstewart

msg:1199971 | 10:48 am on Mar 15, 2003 (gmt 0) | | Most browsers can render background inheritance correctly, I can't think of one that does. |
| Or rather they render incorrect background inheritance correctly ;) If you just want the background colour to be the same as its parent then you can use
background-color: transparent; alternatively I think you can also use
background-color: inherit;
|
|
|