I have multiple parent DIV
elements, which has a child SPAN
inside each of them.
The CLASS
of the SPAN
changes dynamically.
I have added .parent:hover
to apply certain styles to it upon hover, but I wanted NO hover effect if it's child SPAN
is of a specific CLASS
Example code:
.parent {
cursor: pointer;
}
.parent:hover {
box-shadow: 0px 0px 9px #888888 inset;
}
.parent:hover .childActive {
/* code that applies style to the child upon hover over the parent */
}
/* need code that applies style to the parent upon hover, if childActive */
I can do this by a roundabout solution by adding a class dynamically to the parent whenever the child class changes to
childActive
Is it possible to do this in pure css?