How to select an element that doesn't have a child or contains a particular element
how can i select an element in css if it doesn't have or contain a particular element for example
i want to match an element with a class called and doesn't have a child element with a class called
6 Replies
I'm cofused seems like your css should work
https://codepen.io/MannixMD/pen/JjzPZdw?
it's still not working i don't know why
it is only working when the container element only contains a one div but when i add another div it's not matching the container element.
try
it's working now, thanks!
![thumbup](https://cdn.discordapp.com/emojis/766368920504107088.png)
Yep it has to be :not :has for some reason