I am using the below code to highlight a table rows, but it does not highlight the row.
It highlight only the current cell and it only turns the font color to white when i hover over the actual font.
Is there something I am missing?
HTML and CSS:
.schedule tr:not(:first-child) :hover{
font-weight:bold;
cursor:default;
background-color:#B80D9F;
color:white;
}
.schedule{
border-spacing:0px;
}
<table class="schedule" width="90%">
<tbody>
<tr>
<td style="width:50%">hello1</td>
<td style="width:50%">123</td>
</tr>
<tr>
<td style="width:50%">hello2</td>
<td style="width:50%">123</td>
</tr>
</tbody>
</table>
Update:
All the answers below are correct, but do not address the second issue with the font not changing to white when a <a> tag is used.
Why would the font-color not change?