Whats wrong with this?

Soldato
Joined
14 Apr 2003
Posts
4,950
Location
Deepest Yorkshire
http://jigsaw.w3.org/css-validator/...+*/ img+{ display:+none; }&usermedium=all

Code:
body {
	font: 120% arial, sans-serif;
	background: black;
	color: #FFFF94;
}


A:link, A:visited, A:active  {
	color: teal;
}

h1 {
	font-size: 200%;
}

h2 {
	font-size: 150%;
}

ol {
	list-style-type: lower-roman;
}

	/* stops images displaying */
img {
	display: none;
}

even when I give it a background-color it still doesn't like it :mad:
 
SherberT* said:
Code:
A:link, A:visited, A:active  {
	color: teal;
background-color : black;
}

I tried that with background-color : transparent; but it didnt work, is a background-color mandatory?
 
The validator is just warning you that there is no background-color set for those selectors, it's not a failure as such just a precaution. It's intended to warn you in case the containing elements background-color is the same as the text, rendering it invisible.
 
yep, its just that it's for an assigment and it says I have to have no errors or warnings for it.
 
Nope, setting it to 'none' won't work. If you want to get rid of the warning without setting a colour then just set the background-color property of the link selectors to inherit.
 
Mr_L said:
Nope, setting it to 'none' won't work. If you want to get rid of the warning without setting a colour then just set the background-color property of the link selectors to inherit.

cheers, I also had to set the max-width property as the background was going the whole way accross the page and covering up some background images. :rolleyes:
 
Back
Top Bottom