I have this markup:
<div class="parent">
<img class="selected child"/>
</div>
<div class="parent">
<img class="child"/>
</div>
What I would like to do is to make an :after to the "parent" div that has class=selected only.
That means I'd like to make :after to the first one, because it has a child with class "selected".
I can not use:
.parent:after .selected {}
If I use
.parent .selected:after {}
it is not good as the img get :after content and it doesn't work, I need to put :after to the parent of the image.