homepage Welcome to WebmasterWorld Guest from 23.20.220.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
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;

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved