I know it can be done in JavaScript, however I am looking for solution in CSS.
JavaScript
CSS
I have three divs.
You just have to replace the + selector with ~ cause the #hide is not placed after #main
+
~
#hide
#main
So your code is:
#show {display:none} #main:hover + #show { display:block } #main:hover ~ #hide { display:none }