By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,991 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Changing TD background color doesn't work

P: n/a
I have a table column that starts like this
<td class="menu" style="WIDTH: 18%" valign="top">
If I specify the bgcolor property for this tag everything works okay
but if I try doing it in a CSS it doesn't work. Here is what I have in
the CSS.
All I want is a black background in my table column.

body
{
background: #696969;
background-color: #696969;
background-image: none;
}

div
{
display: block;
}

img
{
vertical-align: baseline;
}

A:link
{
color: White;
text-decoration: none;
}

A:active
{
color: White;
text-decoration: none;
}

A:hover
{
color: White;
text-decoration: underline;
}

table
{
border-top: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
border-left: 1px solid #ffffff;
}

td.menu
{
color: #000000;
background-color: #000000;
background-image: none;
}
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
*Mark Constant* <co*******@mix-net.net>:

I have a table column that starts like this
<td class="menu" style="WIDTH: 18%" valign="top">
That's a table cell, not a column (<col/>).
If I specify the bgcolor property for this tag everything works okay
but if I try doing it in a CSS it doesn't work.
Which browsers and version?
background: #696969;
background-color: #696969;
background-image: none;
The latter two rules are redundant to the first one.

] table { border: 1px solid #ffffff; }
td.menu {
color: #000000;
background-color: #000000;


This gives you black on black in that cell in virtually any CSS enabled
browser out there. If it doesn't happen to work on your system, there's some
influence you didn't tell or quote--better provide an URL and information on
the testing environment.

--
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that."
G. H. Hardy
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.