Having some challenges with CSS selectors, I'm hoping to find some assistance here.
Presented with HTML code that resembles the following:
<table class=myTable>
<tr>
<td>this is the td of interest</td>
</tr>
<tr>
<td>
<table>
<tr><td>I don't want this td!</td></tr>
</table>
</td>
</tr>
</table>
Specifically trying to add a background image to the FIRST td of the FIRST tr. Initially attempted the following approach:
table.myTable tr:first-child td:first-child {
background-image: url(someUrl.gif);
}
However, the selector includes the first td of the initial tr within the nested table as well. Multiple attempts with different combinations such as > and + were not successful. Open to any suggestions or solutions.
Please note: Looking for an approach that works with IE7+ compatibility in mind.