Forum Moderators: not2easy
.test {background-color:blue}
.test:hover {background-color:green}... later in the html....
<td class=test>some text</td>
very simple it seems. this works with firefox but not in IE (although I thought it was an IE only feature haha)
basically I would like something (in this case the TD element) to change color when I hover over it.. not just the anchor (all the examples ive seen use A:link or A.someclass:link)
any idea of a good way to make this work.. or what I am missing. thanks.
First, label your styles:
.test {background-color:blue}
.testOver {background-color:green}
Then, for your HTML:
<td class="test" onmouseover="this.className='testOver'" onmouseout="this.className='test'">my text</td>
For what it's worth, if this...
<td class=test>some text</td>
I'm not saying I endorse this sort of hackery, nor that I would use it myself, but it is an option...
cEM