Parent css selector [duplicate]

0

Is there any way to select using only css images whose parent is a <div class="img-parent" ></div> , that is, from a child element?

<div class="img-parent" >
   <img src="/teste.png">
</div>

Something like .img-parent < img , inverse, where img is daughter of div?

    
asked by anonymous 13.12.2017 / 19:29

1 answer

-1

Just do the following: .img-parent img{ //Estilo do elemento }

    
16.12.2017 / 22:16