Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Drop Down Menu

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #41228
    LaurelBrittany
    Participant

    I can’t get my drop down menu to display properly when it is hovered. I used the following code:

    ul.nav li ul {
    display: none;
    position: absolute;
    z-index: 9999;
    background: #3c3c3b;
    white-space: nowrap;

    }

    ul.nav li ul a{
    display: block;
    }

    View the full code here: http://www.lwebdesigns.net/designs/newsroom/newsroom.html

    #116664
    Watson90
    Member

    I think it should just be

    .nav ul { display: none; }

    .nav ul:hover li { display: block; position: absolute; }

    Make sure your navigation is set to position: relative;

    #116666
    LaurelBrittany
    Participant

    That didn’t work :(

    #116668
    Watson90
    Member

    I’ve just coded this up for you, this is kind of what you’re after I think.

    http://codepen.io/Watson90/pen/ekmKv

    #117018
    LaurelBrittany
    Participant

    That works great! Now how do I get it to work with the sub menu items? They automatically display.

    #117069
    Watson90
    Member

    Do you mean a drop down of the drop down menu?

    #117466
    LaurelBrittany
    Participant

    Yes!

    #117516
    Watson90
    Member

    Nice work @kevin11189

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.