I'm looking for some help with adjusting the CSS of a div when hovering over certain elements. Here is my current code:
<div class = "container-main">
<div class = "container-inner">
<ul class = "list">
<li>Option 1</li>
<li>Option 2</li>
</ul>
</div>
</div>
<div class = "container1">
<p>Container text</p>
</div>
<div class = "container2">
<p>Container text</p>
</div>
I am trying to change the classes container1 and container2 when hovering over the ul or li within the main container. I currently only know how to do this with sibling containers, but that's not the effect I want.
.container-main:hover + .container1 {background:red;}
Any assistance in achieving this would be greatly appreciated. Thank you!