Jump to content

Highlight cell when hover over?


barkster

Recommended Posts

Is it possible to change the background color of a cell when you hover over it? Would not contain any text in the cell. Using just CSS would be great, javascript if needed. I think I've seen it with javascript but can't figure out with CSS. Thanks

Well guess I should have googled first, pretty easy

<td bgcolor="#FFFFFF" onmouseover="style.backgroundColor='#84DFC1';" onmouseout="style.backgroundColor='#FFFFFF'">&nbsp;</td>
Link to comment
https://forums.phpfreaks.com/topic/5690-highlight-cell-when-hover-over/
Share on other sites

[!--quoteo(post=358044:date=Mar 24 2006, 08:37 PM:name=lpxxfaintxx)--][div class=\'quotetop\']QUOTE(lpxxfaintxx @ Mar 24 2006, 08:37 PM) [snapback]358044[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I also have a question very similiar to this. How do you create a cell where the whole row is a link, not just the text?
[/quote]


Or you can do:

[code]<tr>
    <td style="background-color:#FFFFFF" onmouseover="this.style.backgroundColor='#EEEEEE'" onmouseout="this.style.backgroundColor='#FFFFFF" onclick="window.location='otherpage.php'">Text in row</td>
</tr>[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.