Let me give an example to clarify my question.
Assume I have a table like below:
<table>
<tr>
<th>header1</th>
<th>header2</th>
</tr>
<tr>
<td>elem1</td>
<td>elem2</td>
</tr>
<tr>
<td>elem3</td>
<td>elem4</td>
</tr>
</table>
I want to show that table row containing <td>
element is clickable, so I'm trying to change the mouse pointer cursor to hand when it hovers on <tr>
that contains <td>
element.
I can do that by setting the style like below:
table tr:not(:first-child) {cursor:pointer;}
The first child of a table is normally the <tr>
that contains <th>
.
Here comes the question, how to write the css style to eliminate <tr>
that contains <th>
as direct child with more intuitive way?