Forum Moderators: open

Message Too Old, No Replies

Highlight multiple rows

On mouseover, how can I have multiple rows highlight at the same time?

         

max4

7:50 pm on Feb 4, 2008 (gmt 0)

10+ Year Member



Hi,

I would like to know if it is possible to have a multi-row segment of a table highlight when a person moves the pointer above any cell in the rows of interest. For example, how can I code the following table segment so that on mouseover all cells highlight at the same time?

<tr>
<td colspan="2">
<td rowspan="2">
<td rowspan="2">
<tr>

<tr>
<td>
<td>
<tr>

If this is possible, how can it be done?

Thanks,
Max

Trace

9:58 pm on Feb 4, 2008 (gmt 0)

10+ Year Member



If I'm understanding you correctly;
<table style="width:100%">
<tr onmouseover="this.style.backgroundColor='#cccccc';" onmouseout="this.style.backgroundColor='';">
<td colspan="2">&nbsp;</td>
<td rowspan="2">&nbsp;</td>
<td rowspan="2">&nbsp;</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#cccccc';" onmouseout="this.style.backgroundColor='';">
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

Is that what you're looking for?

max4

3:44 pm on Feb 5, 2008 (gmt 0)

10+ Year Member



Hi Trace,

Thanks for your reply. That is not what I am looking for though. What you gave me looks like this:

[row1 cell][row1 cell][row1 cell]
[row2 cell][row1 cell][row1 cell]

When someone points over a cell in row one, the following happens:

[row1 cell highlight][row1 cell highlight][row1 cell highlight]
[row2 cell NOT highlight][row1 cell highlight][row1 cell highlight]

I would like all cells to highlight when someone points over any cell, whether it is in row one or row two. That is, both rows (Row 1 and 2) will highlight if someone points over a cell in either row. Any ideas?

max4

4:03 pm on Feb 5, 2008 (gmt 0)

10+ Year Member



My question was answered in the CSS forum, here is a link:

[webmasterworld.com...]