This is what I would like to happen:
–
When a user hovers over a cell it changes the background colour
When a user hovers over a cell it changes the link colour of the text that is inside of it
I want both of these to happen when the cell is hovered over, not just the text
At the moment I have got the first one working. When a user hovers over the cell the background colour changes. The problem is that at the moment when the user hovers over the cell the text link colour does not change, it only changes when the user physically overs over the text link part.
How can I do this?
Here is what I am using at the moment:
[CODE]<table class=”menu” align=”right” cellpadding=”5″ cellspacing=”5″> <!–MENU TABLE–>
<tr>
<td class=”menu1″ bgcolor=”#B5E0FF” onMouseOver=”style.backgroundColor=’#DBE6F3′; style.cursor=’hand’;”
onMouseOut=”style.backgroundColor=’#B5E0FF’;” onClick=”‘#'”>
<font color=”#034A98″><span class=”nav1″><a href=”#”>About M.E. DESIGNS</a></span></font>
</td>
</tr><tr>
<td class=”menu1″ bgcolor=”#A6BBEA” onMouseOver=”style.backgroundColor=’#DBE6F3′; style.cursor=’hand’;”
onMouseOut=”style.backgroundColor=’#A6BBEA’;” onClick=”‘#'”>
<font color=”#0084FF”><a href=”#”>Portfolio</a></font>
</td>
</tr><tr>
<td class=”menu1″ bgcolor=”#738BB7″ onMouseOver=”style.backgroundColor=’#DBE6F3′; style.cursor=’hand’;”
onMouseOut=”style.backgroundColor=’#738BB7′;” onClick=”‘#'”>
<font color=”#5DB6FA”><a href=”#”>Benefits</a></font>
</td>
</tr><tr>
<td class=”menu1″ bgcolor=”#034A98″ onMouseOver=”style.backgroundColor=’#DBE6F3′; style.cursor=’hand’;”
onMouseOut=”style.backgroundColor=’#034A98′;” onClick=”‘#'”>
<font color=”#86C9FE”><a href=”#”>Contact Information</a></font>
</td>
</tr>
</table>
This is the css relating to the links:
[CODE].nav1 a:link {color: #034A98; text-decoration: none;}
.nav1 a:visited {color: #034A98; text-decoration: none;}
.nav1 a:active {color: #738BB7; text-decoration: none;}
.nav1 a:hover {color: #738BB7; text-decoration: none;}
I am only working on the first cell at the moment, so there’s only the css for that one cell. Once I get the first one working I will do the same for the other 3 cells.
I really don’t know much about javascript and using spans in css so most of the stuff in there is taken from other websites.
Also, is it possible to do this with only css? or can it only be done with the little bit of what I think is javascript?