CSS: On hover show and hide different div's at the same time? [duplicate]
http://jsfiddle.net/MBLZx/
Here is the code
.showme{
display: none;
}
.showhim:hover .showme{
display : block;
}
.showhim:hover .ok{
display : none;
}
<div class="showhim">
HOVER ME
<div class="showme">hai</div>
<div class="ok">ok</div>
</div>
if the other div is sibling/child, or any combination of, of the parent yes
.showme{
display: none;
}
.showhim:hover .showme{
display : block;
}
.showhim:hover .hideme{
display : none;
}
.showhim:hover ~ .hideme2{
display:none;
}
<div class="showhim">
HOVER ME
<div class="showme">hai</div>
<div class="hideme">bye</div>
</div>
<div class="hideme2">bye bye</div>
Have you tried somethig like this?
.showme{display: none;}
.showhim:hover .showme{display : block;}
.hideme{display:block;}
.showhim:hover .hideme{display:none;}
<div class="showhim">HOVER ME
<div class="showme">hai</div>
<div class="hideme">bye</div>
</div>
I dont know any reason why it shouldn't be possible.