Forum Moderators: not2easy

Message Too Old, No Replies

Common Drop Down Hover Problem

I just don't get it.

         

Webber

3:41 am on Jul 23, 2009 (gmt 0)

10+ Year Member



I have a common problem with my drop down menu. It is disappearing too fast to be able to click on anything.

I thought it was the hover problem that IE seems to have, but when I checked, there is an issue with it in every browser.

(I'm using a Wordpress Theme, in which I'm making changes. I did not create the drop down menu, but would like to make it work)

MartinWeb

4:37 am on Jul 23, 2009 (gmt 0)

10+ Year Member



When do you have it set to disappear? Try giving a user .5 of a second to reach the menu. After that, enable an "onmouseout" that closes the menu when the user moves the mouse off.

swa66

9:35 am on Jul 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let's assume you're not using Javascript and hence no "onmouseout".

You need to make sure the submenu is flush against the parent that you're hovering or you'll have a hard time gettign from hovering the parent to the child as the gap in between means you're not hovering any longer.

SuzyUK

12:37 pm on Jul 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



webber, separate out the menu into a separate file, make sure you get it working as Swa describes with CSS only, if there's a space between the parent and the child elements it will be unable to hold the :hover function, so make sure that's "fixed" first

Then after that you can add a JS/Jquery/mouseover/out function as an enhancement which will help the drops stay active for longer, i.e. they don't rely on the CSS :hover action - this makes it seem smoother. IMHO The JS addition should be considered an enhancement as opposed to a function unless it's not necessary that users need access to the drop downs which might for example be the case if there's other ways to navigate to the child pages.

But I would not rely on JS for the total effect as that could hamper usability.

You could also "fix" the menu so it works with CSS, i.e. overlap the child and parent slightly so that there is no break in the hover function, but decide that doesn't look as pretty as you'd like then have the javascript not only control the delay/drop times but also change the position of the drops back to what is more fitting. JS users will have the best of both worlds but the menu will still function if JS not available