Site logo

Archived topic

How to Stick Secondary Navigation?

7 replies · Started by optimizeit on January 5, 2020

Viewing posts 1–8 of 8

Hi there,

add this CSS:

#secondary-navigation {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}
@media (max-width: 768px) {
    #secondary-navigation, #secondary-navigation ul {
        display: block;
    }
    #secondary-navigation .menu-toggle {
        display: none;
    }
    #secondary-navigation {
        top: 40px;
    }
}

Thanks for the reply.

1. It is giving this error when I add the CSS: https://i.imgur.com/bWwdQFF.png

2. I have Primary Bar as Sticky as well in the mobile. How can I make it perfect for the mobile where both Primary and Secondary are sticky? Please check.

3. Secondary is not sticky in mobile: https://i.imgur.com/ZLbXK6T.png

4. Secondary is not visible in mobile either. I want to show it.

Thanks.

Still Looking for Answers!

Thanks for the reply.

1. It is giving this error when I add the CSS: https://i.imgur.com/bWwdQFF.png

2. I have Primary Bar as Sticky as well in the mobile. How can I make it perfect for the mobile where both Primary and Secondary are sticky? Please check.

3. Secondary is not sticky in mobile: https://i.imgur.com/ZLbXK6T.png

4. Secondary is not visible in mobile either. I want to show it.

Thanks.

Still Looking for Answers!!

Thanks for the reply.

1. It is giving this error when I add the CSS: https://i.imgur.com/bWwdQFF.png

2. I have Primary Bar as Sticky as well in the mobile. How can I make it perfect for the mobile where both Primary and Secondary are sticky? Please check.

3. Secondary is not sticky in mobile: https://i.imgur.com/ZLbXK6T.png

4. Secondary is not visible in mobile either. I want to show it.

Thanks.

I edited the CSS here

You can safely ignore the warnings in the Additional CSS.

You're welcome

This archived topic is closed to new replies.