[thelist] onmouseover color change for <tr>

Mark Kennedy mark at eurogamer.net
Sat Sep 8 13:50:10 CDT 2001

I'm a bit confused.  Are you specifying a color for the TD and then changing the
color of the TR?  I think TDs are rendered 'on top' of the tr.

If you look at this sample you'll see what I'm saying:

		<title> - </title>
cellspacing="10" cellpadding="10" border="0" bgcolor="#eeeeee>
			<tr bgcolor="#ff6600">
				<td bgcolor="#0066ff">HIHIHIHIHI</td>
				<td bgcolor="#0066ff">HIHIHIHIHI</td>
			<tr bgcolor="#66ff00">

So the td color isn't inherited from the tr.

What I'd do if I wanted to make all of the cells in a row a certain colour,
would be:

<tr class="monkeyface1">

and then in my stylesheet put

tr.monkeyface1 td {
	background-color: #ff6600;

If I wanted a rollover effect for the whole row, I'd make another class
(monkeyface2) and then change the class name of the tr for the rollover:

onmouseover="this.className = 'monkeyface2'"

Hope I'm not patronising anybody - I may have misunderstood the question.




Mark Kennedy

On Sat, 8 Sep 2001, ted serbinski wrote:

>> you mean, other than the obvious of not using the bgcolor attribute?
>> i'm afraid that if you need to use that attribute you're out of luck.
>> otherwise, just remove it and apply the bgcolor via css.
>no i mean using bgcolor. like below:
>it just doesn't seem to override a color i've specified in the actual tag, 
><td bgcolor="#ffcc99">
>so basically this is only going to work if i've specified no bgcolor?
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt ! 


More information about the thelist mailing list