0
Is there any way to select using only css the images whose parent element is a <div class="img-parent" ></div>
, that is to say, from a child element?
<div class="img-parent" >
<img src="/teste.png">
</div>
Something like .img-parent < img
, inverse, where the img is the daughter of the div?
.img-parent img
will pick up all images daughters of.img-parent
. That rule doesn’t fit?– Renan Gomes
In CSS you can’t get the parent element. You can only do this in jQuery
– Sam