I have this scenario
<div>
<div>
<i>italic text</i>
</div>
</div>
I am seeking to choose just the first div, the one that does not contain <i>
as children. I am out of curiosity about how to do it the :not
pseudo-selector. Some examples that didn't work for me:
- div > :not(i)
- div:not(div > i)
- div:not( > i)
- div:not(div > i)
- :not(div > i)
Any ideas of how to achieve it without class selectors and with :not
selector?