I can't figure out why I can't achieve selecting rows that are direct children of a table (given that other sub-table are included in TD's of main table, I just want direct children rows, not rows of descendant tables).
Here the remaining structure after radical simplification (also see jsfiddle here):
<body>
<table>
<tr>
<td>TR 1 - TD 1 </td>
<td>TR 1 - TD 2 </td>
</tr>
<tr>
<td>TR 2 - TD 1</td>
<td>
<table>
<tr>
<td>Table 2 - A </td>
<td>Table 2 - B </td>
</tr>
<tr>
<td>Table 2 - C</td>
<td>Table 2 - D</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
I'm not able to select rows that are direct children of the main table:
- body>table tr {background-color:lightgray;}
logically selects all rows of table and sub-table
- body>table tr tr {color:blue;}
logically selects all rows of sub-table only
- but body>table>tr {color:red;}
doesn't select anything at all (no red text to be seen)
What am I doing wrong? On the structure? On the selectors?
->jsfiddle