Forums

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

Home Forums CSS Css Dropdown with 2 Levels

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42738
    fwhenin
    Member

    Got this a while ago. my bread and butter Dropdown nav CSS setup. but now looking to add a second level or dropdown.

    http://codepen.io/fwhenin/pen/BKkud

    2 questions.

    1) How can I make the second level DIRECTLY to the left of the parent

  • (instead of below and to the left)
    2) How can I make it’s left edge be against the right edge of the parent li (in case the text spreads the li out farther)? I’d imagine I’d have to rely on percentage padding instead of px

    Thanks in advance

#124618
Paulie_D
Member

nav > ul > li > ul li > ul {
top: 0;
}

Will align the whole 3rd level menu with the 2nd level.

Then

nav > ul > li > ul li {
position: relative;
}

#124779
fwhenin
Member

AHH, that’s what I was missing, the relative positioning on the parent li. THANK YOU

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