HighDots Forums  

highlight a row

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss highlight a row in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
snet
 
Posts: n/a

Default highlight a row - 07-15-2003 , 01:12 PM






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



Reply With Quote
  #2  
Old   
Evertjan.
 
Posts: n/a

Default Re: highlight a row - 07-15-2003 , 06:10 PM






snet wrote on 15 jul 2003 in comp.infosystems.www.authoring.stylesheets:
Quote:
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)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.