How to select images in this document that are not inside an element with a .todeep class? In the case below, you should select the second and third elements. I donβt know how deep the images will be after the todeep element.
<body> <div class="todeep"> <img> </div> <div> <img> <div> <img> <div class="todeep"> <img> <div> <img /> </div> </div> </div> </div> </body>
At first I thought of a simple solution: *: not (.todeep) img, but it will also display images that also have a "todeep" element among their ancestors.
Han dijk
source share