This work good ..
#a:hover + #b {
background: #ccc
}
<div id="a">Div A</div>
<div id="b">Div B</div>
but the opposite does not work. It's a solution for that ??
#b:hover + #a {
background: #ccc
}
This work good ..
#a:hover + #b {
background: #ccc
}
<div id="a">Div A</div>
<div id="b">Div B</div>
but the opposite does not work. It's a solution for that ??
#b:hover + #a {
background: #ccc
}
You cannot select previous siblings using CSS. You could alternatively use jQuery solution to do that!