Archived topic
Best way to have sticky/fixed header
7 replies · Started by Fabien on March 27, 2019
Hi,
What is the best way to have my header behaving as a sticky / fixed header ?
Thanks
Hi there,
the simplest way is to use the nav as a header then you can use the sticky nav:
https://docs.generatepress.com/article/navigation-as-a-header/
Note: this method will be a one click option in the next release of GP Premium 1.8 - its currently in alpha for public testing.
Thanks, works like a charm. However, my logo is now super big, how can I fix the width ?
Fabien
Looks like you've fixed this?
I see a normal size logo:
https://www.screencast.com/t/OYgAlmwk2
It is too big for me, I'd like to make is smaller...
The logo size is based upon the Menu Item height in the Customizer > Layout > Primary Navigation or Sticky Navigation.
If you don't want to reduce that height then you can increase the padding around the image with CSS:
.main-navigation .navigation-logo img {
padding: 15px;
}
Thanks David !
Glad to be of help