Sticky works in preview but not in published website


I have a small issue right now designing hero section covered on a scroll by other section. I achieved my goal but it doesn’t work on a published website. :confused:

Here is a preview

And here you can check how it works on website

Hi Kacper,

Not sure exactly what are you trying to sticky position, can you rephrase?


Yeah, sure.

Check the first link - when you start scrolling in the preview mode you will see that text-section moves over the hero/header section but when I publish site (second link) it doesn’t work anymore - it scrolling as usual. I’ll upload here video also to make more clear what I mean.

It might be the overflow:scroll you gave to the sticky element. Explanation here.

btw, you don’t need Sticky for that. You can and should use Fixed.

Thanks for explanation.

I’ve tried to make it with fixed position but I can’t figure out how to make that work. :confused:

BTW, why do you use the overflow:scroll?

1 Like

That was easy, thanks!

Probably I changed it accidentally