I recently created a pure css drop-down menu using Google tutorials.
I have an issue though:
If I give a small margin to the 2nd level ul, when you hover on the gap between the ul and parent li drop-down fades away.
Is there any way to fix this not involving Javascript?
Refer to the demo here : http://jsfiddle.net/ba76n/2/
that margin is causing the mouse to drop the “mouseover” state, without it it works fine.
If you switch to
padding-top:.5em;it should work as expected. This is because margin is on the outside of block elements while padding is on the inside.