I know that there does not exist a CSS parent selector, but is it possible to style a parenting element when hovering a child element without such a selector?
To giv
Another, simpler approach (to an old question)..
would be to place elements as siblings and use:
Adjacent Sibling Selector (+
)
or
General Sibling Selector (~
)
I'm hovered too!
#parent {
position: relative;
height: 100px;
}
/* Move button control to bottom. */
#control {
position: absolute;
bottom: 0;
}
#control:hover ~ #target {
background: red;
}
Demo Fiddle here.