Background image rollovers

admin

Administrator
Staff member
I have a menu of buttons which is basically like this:<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td background="menu/1.gif">home</td>
</tr>
<tr>
<td background="menu/2.gif">events</td>
</tr>
</table>I won't bother including the full code since it's not needed for this problem.

I have a table of buttons which are simply text placed upon a background image. I would like to have a rollover effect on the buttons--but Netscape does not support the "background" attribute of a <td> in JavaScript. It displays the table with the background images just fine, but I cannot change them via JavaScript (and after checking the W3C specifications, the JavaScript object technically does not have that background attribute anyway--IE apparently just includes it as an extra.)

So is there any way to put a background image behind some text, and change the image for rollovers via JavaScript?
I need cross-browser compatibility here.

Thank you!
 
Back
Top