Let’s say I have a list and by hovering on it list elements change their colors.
<li class="navbar"><a class="navbar" href="">xxxxx</a></li>
<li class="navbar"><a href="">xxxxx</a></li>
<li class="navbar"><a href="">xxxxx</a></li>
.navbar:hover a{
color: red;
}
Now, I want the first element to change color the same way by hovering, for example, on some div
I have tried .div1:hover .navbar
and similar solutions but nothing seems to be working
New contributor
mikołaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.