Forum Moderators: not2easy
I have it working however not fully as I like:
.Back_colour a:hover {
text-decoration: none;
background-color: #D9E7FF}
<table width="200" border="1" class="Back_colour">
<tr>
<td>1</td>
<td>1</td>
<td><a href="l.">1</a></td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td><a href="7.">2</a></td>
</tr>
</table>
I want it so if the visitor rolls over any cell in row '1' the whole row changes background colour not just that cell. How can I do this?
Thanks!
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<style type="text/css">
.goinghigh tr:hover {
background-color:red;
}
</style>
</head>
<body>
<div id="wrapper">
<h2>Ipso</h2>
<p>Ipso lorem</p>
<table class="goinghigh">
<tbody>
<tr>
<td>11</td>
<td>12</td>
</tr>
<tr>
<td>21</td>
<td>22</td>
</tr>
</tbody>
</table>
<p>Ipso lorem</p>
</div>
</body>
</html>
works fine in Firefox, and I'm sure it'll work in quite a few others as wel, except for IE6 and older.
<a class="effector" href="javascript:void()">
<table class="effectee">
...
</table>
</a>
Then - in your style section - put the following css:
.effector:hover .effectee
{
background-color: green;
}
Very simple and works on all browsers!
<table>
<tr>
...
<td><a href="javascript:void()" class="effector">
<div class="effectee">...</div>
</a>
</td>
...
</tr>
</table>
The CSS would look like this:
a.effector:hover .effectee
{
background-color: green; /*or w/e color you want*/
}.effectee
{
position:absolute;
width:100%;
height:100%;
}
td
{
position:relative;
}
That should work in all browsers!