Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change tr td color on hover 3

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hi,

I'm trying to make an entire row change color when one cell in the row is activated.

this is my css which is not working:

.linkRow td:hover tr td{
background: #CCCCFF;
}

linkRow is the class which I'm setting in the <tr> tag.

doing this changes the cell on hover, but I'm trying to change all the cells in the parent tr:
.linkRow td:hover {
background: #CCCCFF;
}

Thanks in advance!
 
then just do
Code:
{
.linkrow:hover{
...
}

however IE6 doesn't take the hover pseudo class in anything but links.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You'll have to use a JS solution in IE 6, something like:

Code:
<td onmouseover="this.parentNode.className = 'hover';" onmouseout="this.parentNode.className = '';">

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top