Site logo

Archived topic

margin-top sticky nav

5 replies · Started by Jasper on March 25, 2016

Viewing posts 1–6 of 6

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?

Which sticky effect are you using?

none

Try this:

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

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

.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 archived topic is closed to new replies.