Is there a way to change the properties of the parent element when hovering over the child element? Here is an example HTML structure:
<div class="social-icons">
<div class = "innerSocialDiv">
<a href="#" target="_blank" class="fa fa-facebook fa-lg" title="facebook"></a>
</div>
</div>
I am attempting to alter a CSS property of innerSocialDiv
when hovering over fa-facebook
.
This is what I have tried in my CSS:
.fa-facebook:hover + .innerSocialDiv{
background-color: black;
}
Unfortunately, this approach does not seem to be working.