Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

td bgcolor rollover?

Status
Not open for further replies.

tjohnson

Programmer
May 10, 2002
4
US
Is it possible to make the bgcolor in a td rollover on a:hover?

Tim
 
Yes it is. Regards

Big Dave


** If I am wrong I am sorry, but i'm only trying to help!! **

 
It isn't possible with a:hover. Background-color can be used but it will only change the backgrond colour of the text, not the TD.

Can be done with Javascript. You'll have trouble getting this effect with NS4.
 
This works for IE:

<script>
function highlight(cell)
{
cell.bgColor = '#ffff00';
}

function normal(cell)
{
cell.bgColor = '';
}
</script>

<td onmouseover=&quot;highlight(this)&quot; onmouseout=&quot;normal(this)&quot;>

Hope this helps,
Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top