Reputation: 481
I have this CSS:
.int_menu > li.showhide {
display: none;
width: 100%;
height: 50px;
cursor: pointer;
color: #FFFFFF;
background: #F36F25;
}
.int_menu > li.showhide:hover {
display: none;
width: 100%;
height: 50px;
cursor: pointer;
color: #F36F25;
background: #FFFFFF;
}
which changes the background colour on hover fine, however i also have an em
which i need to change when the above is hovered over, i tried adding :hover
after em
.int_menu > li.showhide .icon em {
margin-bottom: 3px;
display: block;
width: 20px;
height: 2px;
background: #FFFFFF;
}
but that didnt work and it only does the change when hovering over each em
how can i make all em
elements inside li.showhide
change on hover of .int_menu > li.showhide:hover {
Upvotes: 0
Views: 41
Reputation: 1793
What you're trying to do is this. I think you were pretty close, you just have to put the child selector after the :hover
.
CSS:
.int_menu > li.showhide:hover em {
margin-bottom: 3px;
display: block;
width: 20px;
height: 2px;
background: #FFFFFF;
}
Or something similar
Upvotes: 4