I have learnt that >
will apply css to direct child only. However I am unable to use it in my case.
I have html as
table[id="tbl"] div div > span {
font-weight: bold
}
<table id="tbl">
<tr>
<td>
<div>
<div>
<span>
outer span
<div>
<span>
inner span
</span>
</div>
</span>
</div>
</div>
</td>
</tr>
</table>
I want to make outer span bold so I wrote css as below
table[id="tbl"] div div > span {
font-weight:bold
}
but my both the spans are coming in bold. I have to do it without changing html, just by using css or jQuery for some reason.