0

Well,

I'm attempting to use an external style sheet, but when I tested a body bgcolor all my table elements inherited the same coolor but I wanted them to retain a white bgcolor.

Also, the-

td:white {
background-color:#FFFFFF;
}

seems to be ignored by both Firefox and IE. (If this is the wrong approach please let me know.)

Any ideas? Here's my external stylesheet so far:

<style type="text/css">
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #000000;
}
body {
	background-color: #f8c762;
}

td:white {
background-color:#FFFFFF;
}

a:link {
	color: #830605;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #830605;
}
a:hover {
	text-decoration: underline;
	color: #830605;
}
a:active {
	text-decoration: none;
	color: #0b50cf;
}

a:link.dark {
 color: #f8c762; text-decoration: none; 
}
a:visited.dark { 
color: #f8c762; text-decoration: none; 
}
a:hover.dark { 
color: #ffffff; text-decoration: underline; 
}

img {border: none
}

</style>
3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by MidiMagic
0

Toddsmith,

Tables and their cells have a transparent background by default, therefore parent element's background-color shines through. For white tables you must explicitly set table, td, th background-color to #FFFFFF.

Also, the-
td:white {
background-color:#FFFFFF;
}
seems to be ignored by both Firefox and IE. (If this is the wrong approach please let me know.)

Try

td.white {
background-color:#FFFFFF;
}

"." is the class selector.
":" is only used for pseudo-classes and pseudo-elements
See http://www.w3.org/TR/CSS2/selector.html

Airshow

0

Airshow,

Thank you for that. Firefox was not honoring the table bgcolor settings, but once I changed the class selector as you mentioned I was able to accomplish the white bgcolor through the sytle sheet.

Thanks again! todd

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.