Is there a simple way to have a table cell change color whenever the mouse is placed over an image, and back to it's original color using CSS and/or onMouseOver/onMouseOut?Dont use tables!
A:link,A:visited
{
background-color:black;
color:white;
display:block;
}
A:hover
{
background-color:white;
color:red;
display:block;
}Table are a perfectly fine way to present tabular data. Also, to answer the original question, try this:
<table>
<tr>
<td onmouseover="this.style.backgroundColor='#eeeeee';" onmouseout="this.style.backgroundColor='transparent';">Your Data</td>
</tr>
</table>very similar to my code in another post pyro But I have never seen that transparent thing, I have always just specified a bg color and set back to that color. Ill have to remember that one.Yeah, since I never set a background color in the first place, I wouldn't want to specify a color onmouseout. If, however, I'd have set a background color (on either the table or the cell) I would have wanted to set it back to that color (in cascading order)Yes but this way It would not interfear with a background image that someone might use.
A:link,A:visited
{
background-color:black;
color:white;
display:block;
}
A:hover
{
background-color:white;
color:red;
display:block;
}Table are a perfectly fine way to present tabular data. Also, to answer the original question, try this:
<table>
<tr>
<td onmouseover="this.style.backgroundColor='#eeeeee';" onmouseout="this.style.backgroundColor='transparent';">Your Data</td>
</tr>
</table>very similar to my code in another post pyro But I have never seen that transparent thing, I have always just specified a bg color and set back to that color. Ill have to remember that one.Yeah, since I never set a background color in the first place, I wouldn't want to specify a color onmouseout. If, however, I'd have set a background color (on either the table or the cell) I would have wanted to set it back to that color (in cascading order)Yes but this way It would not interfear with a background image that someone might use.