I'm not sure why below is not working. I'm trying to apply color:red
style on the outer table
's first tr
and second td
.
table,
tr,
td {
border: 1px black solid;
}
#outerTable>tr:first-child>td:nth-child(2) {
color: red;
}
<table id="outerTable">
<tr>
<td>
outer table 1st tr 1st td
<table>
<tr>
<td>
inner table 1st tr 1st td
</td>
<td>
inner table 1tr 2nd td
</td>
</tr>
</table>
</td>
<td>
outer table 1st tr 2nd td -- Only want this Red
</td>
</tr>
</table>