NameSilo

A td a mouse out a mouse over and a background color

Spaceship Spaceship
Watch
Impact
20
sup people

ok im starting to redesign my site, and im wanting to change the background color of a <td> tag on mouse over so ive got this

Code:
style="cursor:pointer;cursor:hand;" onMouseOver="bgColor='#CFDFCF'" onMouseOut="bgColor='#DFEFDF'"


thing is tho it changes the background color of the page
i used the same thing on a site i was working on but never fishied a while ago and it never did this anyone know whats wrong?

attached is my code

thanks
adam
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
I offer 2 solutions. Use background-color: #xxxxxx;" instead of bg-color as background-color refers to the background color of the text and bgcolor is that of the page, table, or td. But, this will only highlight the immediate background of the text, nothing beond the pixels within the text.

However, if you wanted the whole td cell to changecolor, instead of just the background of the text then you can move your entire code to the td tag.
 
0
•••
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back