Site logo

Archived topic

Problem with Sticky Header and Nav Bar

10 replies · Started by Sean on March 7, 2021

Viewing posts 1–11 of 11

Hi, I have GP Pro and I can't figure out how to make the Header and horizontal navigation bar below it stay "sticky" during scrolling. I was able to find the check box for making the nav bar sticky, but not both. I've searched through the forums and on google and it seems like the only option is knowing how to write the proper code in CSS (I think? I don't know anything about that.) or getting a paid plugin that lets me make both items sticky. Any help is greatly appreciated!

Hi there,

Any chance you can link us to the site in question?

You can use the private information field.

Let me know :)

I'm not sure. I'm building the site on a temporary sub domain. I'll post the link below.

Yes, I would like that section to remain as people scroll. I tried putting the logo as the background image for the navigation bar, but it didn't look good at all. The nav buttons were in the middle of the image and the image didn't fit right.

Hi Leo, it looks like the one I tried was different from what you suggested (on the sticky navigation). That way actually works nicely. Not exactly what I was aiming for, but it might be better.

The only problem is that when you start scrolling and the logo appears to the left, with the menu to the right, the logo has a lot of unnecessary padding above and below the logo, making it thinner and harder to read. Is this adjustable?

Thanks for pointing that out!

Hi Sean,

You could give this CSS a try:

.sticky-navigation-logo img {
    padding: 0;
}
#sticky-navigation .navigation-branding {
    margin-left: 0;
}

Leo, your suggestion to use a logo on the Nav bar was not what I had in mind, but it turns out to be a better solution because it gives more screen space on a PC and especially on a phone. Also, when using a phone, the menu is already collapsed, so instead of a mostly empty bar, the logo fills in the space nicely.
Thanks!

Ying, your code did the trick perfectly! Now the logo fills the space and is much easier to read. Thank you!

Glad we could help :)

This archived topic is closed to new replies.