...

View Full Version : CSS bg rollover for entire <tr>?



Ultragames
03-03-2005, 09:07 PM
I am using this script to make the entire <td> a link, and to rollover the background. However, i want this to happen to every <td> in a <tr> when you put your mouse over one of them. Heres the script:


<style type="text/css">
<!--
.link {
display:block;
width:100%;
height:100%;
text-decoration:none;
color:#000000;
}
.link:hover {
background:#B9B9B9;
display:block;
width:100%;
height:100%;
text-decoration:none;
color:#000000;
}
-->
</style>

I am putting the class 'link' in an <a> inside each <td>

How can i make it rollover every <td> in the <tr> without JS?

rmedek
03-03-2005, 09:43 PM
td:hover { properties }

But you still need js to get it to work in IE. That's about as much as I can guess without seeing the page or the HTML...

bradyj
03-03-2005, 09:49 PM
Yes, IE doesn't handle the hover attribute for anything other than an a tag -- you could make the element inside the td an a tag, with whatever else in it, to force the feature.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum