473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
1 11973
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Doug Farrell | last post by:
Hi all, I'm trying to use the PHP GD functions to make graphical changes to image files. In particular I'm trying to add a 'highlight' rectangle to an image. So far everything I've tried doesn't...
13
by: David Morgan | last post by:
Hello I have a little function to highlight text if it exists. Function Highlight(vFind, vSearch) Dim RegEx Set RegEx = New RegExp RegEx.Pattern = vFind RegEx.IgnoreCase = True Highlight =...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
5
by: Atara | last post by:
I am trying to convert the following code to VB .Net, I still have some gaps (the lines that are marked with (*)) and also I need an ending condition for the while loop. any help would be...
2
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
When you highlight a selection of text represented in an object on a form, somewhere in the Framework or alternatively in the Windows API there exists an array of variables that either contain as a...
2
by: Celeste | last post by:
Hello, I'm trying to parse the referring url for google search terms so that when this page loads it will scroll to and highlight the search term(s). Should i be using document.referrer? ...
0
Merlin1857
by: Merlin1857 | last post by:
A thing I have been asked for on a number of occasions is the ability to highlight text after its been searched for in a record return page. The following does this perfectly. Use this function...
4
by: Andrew Poulos | last post by:
As a user tabs about a web page I want to highlight with a, say, 2 pixel solid yellow border the anchor that currently has focus. When the anchor loses focus the border is removed. The anchors...
3
sujathaeeshan
by: sujathaeeshan | last post by:
Hello all, I want to highlight or select data grid row based on first letter of first column in data grid with keyboard. Just by pressing the key of first letter of the column ,it has to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.