Jump to content

background-color/color conflict


dorun2

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...