margin-top sticky nav

Home Forums Support margin-top sticky nav

Home Forums Support margin-top sticky nav

  • This topic has 5 replies, 2 voices, and was last updated 8 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #181521
    Jasper

    To align the menu with the logo i gave the menu some top-margin.

    .nav-aligned-right .main-navigation ul li {
    margin-top: 30px;
    }

    But i want to apply this only when the menu is not sticky. How would i do that?

    #181633
    Tom
    Lead Developer
    Lead Developer

    Which sticky effect are you using?

    #181642
    Jasper

    none

    #181654
    Tom
    Lead Developer
    Lead Developer

    Try this:

    .nav-aligned-right .main-navigation:not(.is_stuck) {
        margin-top: 30px;
    }
    #181657
    Jasper

    thanks, it works fine,
    and what if i choose the other sticky effect options?

    #181679
    Tom
    Lead Developer
    Lead Developer
    .nav-aligned-right .main-navigation:not(.is_stuck),
    .nav-aligned-right .main-navigation:not(.navigation-clone) {
        margin-top: 30px;
    }

    That should do it for all of the effects 🙂

    • This reply was modified 8 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.