[Tips & Scripts] Creating a Fixed Header/Footer (aka Sticky Header)



Show first post

156 replies

I am attempting to use this snippet to keep the header of my page fixed at the top, but I am encountering some problems that I’m hoping someone can help me with.

I follow the above instructions and create the JS and change the box# the 1 place it needs to be changed. However when I do that it messes up the entire header and moves copy as well as the header. Below is the JS that i’ve uploaded

!

Hi,

we already implemented the sticky header a few weeks/months back and we didn’t notice any issues. But only recently we figured out that there is an issue on small screens which are less wide than our page properties.

Users are only able to scroll to the right on the page, but not within the header and therefore can’t see all the elements. Please take a look at the youtube video. The page for reference ist Prüfplaner

Did anyone experience the same issues? How did you solve it?

Thank you

I am trying to make a sticky footer on mobile and a sticky header on desktop with the same template. I got the footer for mobile working, but for desktop, i am specifying the header to stick, but it’s making my box stick to the bottom of the page instead.

Any ideas?

I created two javascripts (one for the footer, one for the header)

STICKY FOOTER

STICKY HEADER

Hi,

I am trying to make my header sticky and also have the button scroll to a section on the landing page but I’m unable to do it - can you please help?

Thanks!

Userlevel 6
Badge +3

Hey @alyssawee can you share the page URL? 🙂

Hi Zoe, the page URL is https://offers.piquetea.com/landing-freecartons/ right now but I intend to extend it to all my other landing pages (of the same style)

Could you help me with the sticky header?

Thanks!

Userlevel 6
Badge +3

Sure @alyssawee – I’ll msg you now

@Zoe_Tattersall Could you assist with mine? Can’t seem to make it work.

www.leadaccess.co.uk/test

Thanks!

Userlevel 6
Badge +3

Hey @carpz - you just need to put all the content into a box within the section and update the script to that box id 🙂

You currently have everything in lp-pom-block-398 from what I can see, but the script actually references lp-pom-box-398.

Here’s an example from on my old landing page -

The the box is what holds the content and is referenced in the script -

Hello,

I have added the script and replaced the id with my id. After that the sticky header is working but the elements of the header are not showing!

Page link: http://unbouncepages.com/roofing-replacement-page/

Please help me solving this issue.

Thanks

I’m having the same issue as Elias — the sticky header works, but none of the elements are visible in Preview. 😦

Hello - I’m having the same issues as Elias and feezy mentioned above. My elements in front of the box are not showing. Can you please help?

Userlevel 5
Badge +2

Hi @RogueMarketing!

Could you share a link to your page? That will help us find what went wrong!

Thank you,
Caroline

I can’t seem to make my headerbar sticky. I created a box element in the top of my page and
I have changed the box ID to the ID of my box in the javascript. Can somebody help me look into where the mistake can be?

When I then add the stylesheet for fading, the bar completely disappears. So it seems that the stylesheet part triggers but the script for the bar has an error.

http://borsenlive.dk/bec/

Thanks in advance.

I’ve tried adding this code but it doesn’t seem to work. Here is my test page.

http://unbouncepages.com/landing-page-23846283854/

Thanks.

Joel

You turned the entire section to sticky? or its a box?

Hi all, I tried to insert the sticky nav header but it is not working.

  1. I referenced a Box ID (within a section) within the script.
  2. I also added the script correctly under the Before Body End tag.

Can someone help troubleshoot please? Thank you!
https://bit.ly/2Yud08l

It doesn’t work for me! http://unbouncepages.com/partner-2060/

You’ve checked this?

https://screencast.com/t/gXaOHcmyeSHS

Lifesaver. I haven’t checked the Script Library checkbox. Thank you!

It doesn’t’ work for me. Can you please tell me how to fix it? https://www.321ignition.com/partners/

yes I did.

Never mind it works.

Hi, is there a way to make the banner appear ONLY when we scroll past a certain section or after 15% of the page…

The sticky contains the same CTA button like the one in the header, and we don’t want to show it twice when the page loads. Only when the user scrolls down and doesn’t see the CTA button in the head section.

Reply