Site logo

Archived topic

Secondary Nav Sticky

7 replies · Started by Jatin on July 30, 2021

Viewing posts 1–8 of 8

Hi Guys,

I have enabled Secondary Nav on my site on a specific page. Is there any way to make it sticky when i scroll down the page or scroll up

Private box.

I assume the secondary navigation is added to forums pages, if so, try this CSS:

@media (min-width: 769px) {
body[class*="wpforo"]  #secondary-navigation {
    position: fixed;
    top: 0;
    width: 100%;
}
}

Thank you. This is breaking the secondary menu and aligning it to the left with fixed size. If you check my main primary menu. Its sticky and also when i scroll down the menu height changes. I want to have it similar on this page. This code is making the secondary nav menu to the extreme left and containing it to till the text is available.

Unfortunately, the sticky option uses JS, it only works for primary navigation, it can not be applied to secondary navigation without custom development.

Can you tell me what layout you want for the secondary navigation within the ability of CSS?

Let me know :)

Thanks Ying, I have got rid of Secondary menu as it was not working so i am sticking to forum menu for now.
May be in future i might try this out again but its looking time too much work for now.
Thank you for your help and support on this so far. Appreciate it.

You are welcome :)

This archived topic is closed to new replies.