Welcome to WebmasterWorld Guest from 107.20.20.39

Forum Moderators: not2easy

Message Too Old, No Replies

CSS Drop Down Menu

Having some issues with getting the drop down part to work.

   
3:47 pm on Aug 31, 2012 (gmt 0)



Hello there!

I've been having trouble with this for a very long time and have decided to succumb to actually asking someone.

I want to create a drop down menu with CSS and HTML for my website and have it all sorted out except for the vital part of the drop down. They are basically not hiding until their parent is hovered on and are just always there.

I've tried messing about with the z-index but to no avail, I can post code but only if people need me to do it (I.E I haven't explained myself very well).

Hope you can help :)

Tommybob3000
11:34 am on Sep 13, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi Tommybob3000m and welcome to WebmasterWorld,

z-index can get a bit complicated in drop downs, but I expect the issue is the hide/show. Have you tried setting
visibility:hidden
on the drop downs, then
visibility:visible
on
:hover
so the drop downs appear when the user hovers?

[edited by: alt131 at 2:52 pm (utc) on Sep 23, 2012]

2:16 pm on Sep 23, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



alt131 is right on, and if that's not enough to get your code working, then just start with one of the plentiful CSS menu methods that have already been coded by others. Just type "css menus" into your favorite search engine.