CSS, select an element that have div:not(something) possible ?
CSS, select an element that have div:not(something) possible ?
Hi everyone,
I have something like this
html
<div id="container"> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> <div class="barfoo"></div> </div> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> </div> <div>
I would like to select all the #container > div
(the childs of container)
that do not have a div.barfoo
in their childs.
is it possible with CSS ?
I'm at
css
#container> div :not(div.barfoo) {}
but this is not working, and will select anyway #container > div > div
Any ideas ?