snet wrote on 15 jul 2003 in comp.infosystems.
www.authoring.stylesheets: I have a table of many rows which is made of many cloumns.
Using CSS I would like to highlight an entire given row when the mouse
is over it.
I know a:hover will do this, but not every column of the row will be a
link.
Is what I am seeking possible, and if so, could someone point me in
the right direction?
Use javascript + css:
========== test.html =========
<style>
tr.tr td {background-color:white;}
tr.trred td {background-color:yellow;}
</style>
<script>
function h(x){
x.className="trred"
}
function n(x){
x.className="tr"
}
</script>
<table border=1>
<tr class="tr"
onmouseover="h(this)"
onmouseout="n(this)">
<td>qwerty</td><td>qwerty</td></tr>
<tr class="tr"
onmouseover="h(this)"
onmouseout="n(this)">
<td>qwerty</td><td>qwerty</td></tr>
<tr class="tr"
onmouseover="h(this)"
onmouseout="n(this)">
<td>qwerty</td><td>qwerty</td></tr>
</table>
=========================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)