Given a basic menu and div like below..
#link:hover ~ #custom {
background: #ccc
}
<div class="header">
<div class="nav">
<ul>
<li>
<a id="link" href="#">Link</a>
</li>
</ul>
</div>
</div>
<div id="custom">
Custom Content
</div>
I have tried using the general sibling combinator but it isn't working.
Is there a way using CSS that I can get the custom
div to also change background color when the nav item is hovered?
Do I need Javascript or can this be achieved more simply?