Tekstfarve ved mouseover
Hej eksperter...Jeg har en tabel (med en menu) hvor jeg gerne vil have tekstfarven og baggrundsfarven til at skifte når musen er over.
Jeg har prøvet følgende, men tekstfarven skiftet ikke når jeg holder musen over tabelen, kun når jeg holder musen over selve teksten, og så følger den blot min css-fil! Hvordan kan jeg undgå dette?
<tr>
<td onmouseover="this.style.color='#FFFFFF'; this.style.backgroundColor='#455560'; this.style.cursor='hand';" onmouseout="this.style.color='#000000'; this.style.backgroundColor='transparent';" onclick="forside.click();" style="width: 195px;"><a href="index_1.php" id="forside" class="menu">Forside</a><br></td>
</tr>
CSS-fil:
a:link
{
color : #000000;
background-color : transparent;
text-decoration : underline;
}
a:visited
{
color : #000000;
background-color : transparent;
text-decoration : underline;
}
a:hover
{
color : #942723;
background-color : transparent;
text-decoration : underline;
}
/* Indstillinger for menu */
a.menu:link
{
background-color : transparent;
text-decoration : none;
}
a.menu:visited
{
background-color : transparent;
text-decoration : none;
}
a.menu:hover
{
background-color : transparent;
text-decoration : none;
}
