Floating Group - stick on scroll?

Hi all,

I’m not sure I know the best way to achieve the following behavior. Any ideas?

I have a page that consists of a huge group. There’s a button I’d like to have just under the hero image (sign up for a lesson with X). Then, when that button reaches the top of the screen I’d like it to stick there.

When the page is scrolled back up to the button’s original position I’d like it to return to a normal element on the page (meaning, no longer sticking and blocking the hero image and main menu bar).

“Normal view”

Rest of page view with sticky button:

Basically, I’m trying to create a really clear CTA on a long page.

Ideas to make this work?

Thanks!
Jen

Hi Jen :slight_smile: I’m on mobile now but you can achieve this by creating a separate floating header (set to float:top) with a copy of the button. Set this to not be visible on page load, and a conditional only to become visible once the scroll position is greater than or equal to the position on the page where the on-page button is at the top (looks like it’s around 650?). That should work!

2 Likes

Thanks, Faye!

It worked!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.