Site logo

Archived topic

sticky navigation with merged header

7 replies · Started by Q on January 5, 2018

Viewing posts 1–8 of 8

Hi There,

I've been able to create a sticky navigation using GeneratePress and have also done a version using a Elementor Pro shortcode in a GP Hook, which I found a bit tricky.

I have got the example on my website using the GeneratePress version.

I now want to create the effect where you have a merged header with the navigation, but when you scroll down the navigation sticks and turns white, like the two examples below.

https://www.measurelab.co.uk/
http://7oroof.com/tfdemos/wp-experts/homepage4/

Is this possible to create using GeneratePress and if so what would how would I go about creating it?

Thanks
Q

Hi Leo,

I still seem to be having problems with this.

It seems to work in a mobile view but not desktop view, the sticky navigation is still transparent, with the image background behind it.

I have also added this code to the CSS:

.custom-fixed-header {
position: fixed;
top: 0;
width: 100%;
z-index: 2000;
}

.custom-fixed-header + * {
padding-top: 100px;
}

and added to the GP Hooks

Before Header

After Header

If I take the CSS and the code out of the GP Hooks then the white background does not appear at all in both views when I scroll.

Thanks again
Q

Hi Leo,

When I follow the steps you have given me and take out the CSS I was using, the transparent navigation disappears when you go to the page, only when you scroll, do you see the sticky navigation.

What do I have to do to keep the transparent navigation being seen when you are on the page?

Thanks again
Q

Hi Leo,

Case solved, everything works now.

Thanks for your support and most of all patience.
Q

No problem at all :)

This archived topic is closed to new replies.