Is there a way to change the color of #bg
when hovering over any div element with an id
of symbol in a container?
<div id="container">
<div id="symbol1"></div>
<div id="symbol2"></div>
<div id="symbol3"></div>
<div id="symbol4"></div>
</div>
<div id="bg"></div>
I attempted to use the CSS selector below, but it did not work. I also tried using +
, >
, and just whitespace, with no success.
#symbol3:hover ~ #bg{
background-color:red;
}
Unfortunately, this approach did not achieve the desired result.