dorun2 Posted October 19, 2006 Share Posted October 19, 2006 the pages html validates using the W3C validator.I am now trying to get the css to validate as well, however I continually get the following warning messages *Line : 21 (Level : 1) You have no background-color with your color : a:link* Line : 23 (Level : 2) Redefinition of background-color : a:link* Line : 27 (Level : 1) You have no background-color with your color : a:visited* Line : 32 (Level : 1) You have no background-color with your color : a:active* Line : 32 (Level : 1) You have no background-color with your color : a:activeMy code is: body { margin: 0; padding: 0; color: #333333; background-color: #e5e5dd; background-image: url(images/back.jpg); background-repeat: repeat-y;}#wrapper { width: 777px; color: #333333; background-image: url(../images/back-body.jpg); background-repeat: repeat-y; background-color: #d5d5dd;}/* links */a:link { color: #3366ff; background-color: #e5e5dd; background: transparent;}a:visited { color: #800080; background: transparent;}a:hover, a:active { color:#ff9933; background: transparent;}etc... background-color: #e5e5dd; was added to a:link in an attempt to meet validationI have checked the tutiorials but am unable to find what I need to fix this glitch. Thank you for taking the time to read this. Have a nice day. Sincerely,Con-chan Link to comment Share on other sites More sharing options...
S@m Posted October 19, 2006 Share Posted October 19, 2006 Honestly, I wouldn't worry about it. If you don't specify a background color for your a: elements, who cares? :)I mean, unless you WANT to have a specific color appear on rollovers or something, it will be transparent. So, what's the point?...but that's just my thought. Link to comment Share on other sites More sharing options...
BiteMe Posted October 19, 2006 Share Posted October 19, 2006 Man i feel your painUse background-color:inherit; if you can this will valdate, but even this is no 100% fix for examplehttp://w3schools.invisionzocom/index.php?s...ic=6650&hl= Link to comment Share on other sites More sharing options...
dorun2 Posted October 20, 2006 Author Share Posted October 20, 2006 Thanks for the help. I appreciate it. The inherit worked...moslty. Any idea why transparent would not validate?Will this kind of conflict be resolved in the future so that both color and background-color will not be needd to pass validation? Link to comment Share on other sites More sharing options...
BiteMe Posted October 20, 2006 Share Posted October 20, 2006 As far as im aware 'transparent' doesnt even work let alone validate.Im sure this will be corrected for future Link to comment Share on other sites More sharing options...
dorun2 Posted October 22, 2006 Author Share Posted October 22, 2006 Thanks for the information,I have run into another case of the color/background-color instance where the inherit fix does not work.The site meets W3c html validation.the code is: /* links */a:link { color: #3366ff; background: transparent;}a:visited { color: #800080; background: transparent;}a:hover, a:active { color:#ff9933; background: transparent;}/* links end*/But when I change to inherit it plays with my menu in a nonfriendly manner.my header (menu) code is #header li a { text-decoration: none; display: block; width: 77px; height: 28px;}#header li#ichinomiya { left: 30px; background: url(../../images/dojoimages/dojonav.gif) 0 -28px no-repeat;}#header li#kosakai { left: 108px; background: url(../../images/dojoimages/dojonav.gif) -78px 0 no-repeat;}#header li#nagoya { left: 186px; background: url(../../images/dojoimages/dojonav.gif) -156px 0 no-repeat;}#header li#nishio { left: 264px; background: url(../../images/dojoimages/dojonav.gif) -234px 0 no-repeat;}#header li#okazaki { left: 342px; background: url(../../images/dojoimages/dojonav.gif) -312px 0 no-repeat;}#header li#toyokawa { left: 420px; background: url(../../images/dojoimages/dojonav.gif) -390px 0 no-repeat;}#header li#yatomi { left: 498px; background: url(../../images/dojoimages/dojonav.gif) -468px 0 no-repeat;}#header li#toppage { left: 576px; background: url(../../images/dojoimages/dojonav.gif) -566px 0 no-repeat;}the inherit makes all the links appear as ichinomiya. Thank you for taking the time to read this. Have a nice day.Sincerely,Con-chan Link to comment Share on other sites More sharing options...
boen_robot Posted October 22, 2006 Share Posted October 22, 2006 This topic has it all explained. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now