467,921 Members | 1,249 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,921 developers. It's quick & easy.

highlight a row

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?

Thank you for you help
Jul 20 '05 #1
  • viewed: 11737
Share:
1 Reply
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)
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Doug Farrell | last post: by
13 posts views Thread by David Morgan | last post: by
9 posts views Thread by Devron Blatchford | last post: by
2 posts views Thread by Number 11950 - GPEMC! Replace number with 11950 | last post: by
4 posts views Thread by Andrew Poulos | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.