I have a file like
<div>
<div class="abc">
<div>
<!--some more divs inside-->
</div>
</div>
</div>
What I want to do is to apply styles only to the first div. I tried to use div:not(.abc, .abc *)
, div:not(.abc):not(.abc *)
, div:not(.abc), div:not(.abc) *
but none of these worked. It would be hard to edit the html, because there would be many files to be edited. Also the code shown above appears in different places, so using >
selector is not the solution... Does someone know how to do this?