This is a basic HTML code snippet with accompanying CSS to highlight table rows.
HTML
<table style="empty-cells:hide;" border="1" cellpadding="1" cellspacing="1">
<tr>
<th>Search?</th><th>Field</th><th colspan="2">Search criteria</th><th>Include in report?<br></th>
</tr>
<tr>
<td class="center">
<input type="checkbox" name="query_myTextEditBox">
</td>
<td>
myTextEditBox
</td>
<td>
<select size ="1" name="myTextEditBox_compare_operator">
<option value="=">equals</option>
<option value="<>">does not equal</option>
</select>
</td>
<td>
<input type="text" name="myTextEditBox_compare_value">
</td>
<td class="center">
<input type="checkbox" name="report_myTextEditBox" value="checked">
</td>
</tr>
</table>
CSS
.
.center {
text-align: center;
vertical-align: middle;
}
td, th {
padding: 5px;
}
tr {
height: 25px;
}
tr:hover{
background-color: yellow;
}
The hover effect currently highlights the table row but doesn't include child components like inputs and checkboxes. How can I modify the CSS to also highlight these components when the row is hovered over?