Hiding other divs when hovering one of them
Hey all!
As the title mentions, how do I go about this? Thank you in advance!
7 Replies
Best of you share an example of what you're trying to do.
Indeed an example would be nice.
But if I understand correctly, probably with
has()
(not fully supported yet, https://caniuse.com/css-has)
otherwise, (could be a bit junky if there a margins/gaps between childs, or if there is padding on the parent)
or, with JavaScript
When hover on one of the links, I am trying to make the opacity of the others 0
It would help if you create a pen https://pen.new/ which makes it easier to play around and see what you've attempted
well, in this case
#project-row
is the parent, and the .project
are the childs.
so you could try the 2 options I gave you before
alternative, you could do it with javascriptThe first one worked! Thanks a lot
but, keep in mind. It will not work in FF yet