View Full Version : No Color with your Background-Color?


tabs
11-09-2005, 01:22 AM
Hello, I tried validating my CSS and this came up. Can anybody help? Thanks.

Line : 13 (Level : 1) You have no color with your background-color : .td

.main {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : justify;
}
.td {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : center;
background-color : #333333;
}
a:link {
text-decoration : none;
font-weight : bold;
color : #ff9900;
background : #333333;
}
a:visited {
text-decoration : none;
font-weight : bold;
color : #ff9900;
background : #333333;
}
a:active {
text-decoration : none;
font-weight : bold;
color : #ff9900;
background : #333333;
}
a:hover {
text-decoration : none;
font-weight : bold;
color : #ffffff;
background : #333333;
}

iTux
11-09-2005, 01:24 AM
try removing background, I'm not an expert in CSS, but I think it might work. and instead puting this:
body
{ background: #333333; } at the end.

tabs
11-09-2005, 01:28 AM
Hi. Sorry but it didnt work. Im using external CSS by the way. Thanks.

iTux
11-09-2005, 01:37 AM
my bad, external, and internal are the same though, Here I'll make the whole style sheet for you then.
.main {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : justify;
}
.td {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : center;
background-color : #333333;
A:link
{ text-decoration: underline; color:#FF9900; }
A:visited
{ text-decoration: overline; color:#FF9900; }
A:active
{ text-decoration: linethrough; color:#FF9900; }
A:hover
{ text-decoration: overline; color:#FFFFFF; }
body
{ background: #333333;
}
There you go, if it doesn't work, then take out the background-color on line 12.

tabs
11-09-2005, 02:16 AM
Still doesnt work though.

Monkey Bizzle
11-09-2005, 02:27 AM
it means that you have to specify color: as in the font color whenever you use the background-color: attribute.

tabs
11-09-2005, 02:43 AM
I did specify it, is it this one?

background-color : #333333;

pb&j
11-09-2005, 04:29 AM
color refers to the font color, not the background color.

.td {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : center;
background-color : #333333;
color: #000000;
}

Monkey Bizzle
11-09-2005, 04:30 AM
I did specify it, is it this one?

background-color : #333333;

You tell me... Look at your .td section:

.td {
font-size : 8pt;
font-family : Tahoma, Verdana, Serif;
text-decoration : none;
text-align : center;
background-color : #333333;
}

and then look at my previous post...

it means that you have to specify color: as in the font color whenever you use the background-color: attribute.

You'll learn better if you figure it out for yourself =)

EDIT: Darn it! pb&j beat me!

tabs
11-09-2005, 07:54 AM
Thanks for your help.