jimmerxx Posted August 8, 2023 Share Posted August 8, 2023 Hi I've just installed/implemented ScrollSmoother on my site and i've noticed that now the sticky header doesn't work, any ideas on how I can solve this? Website: https://dev.vennershipley.co.uk/ Link to comment Share on other sites More sharing options...
mvaneijgen Posted August 8, 2023 Share Posted August 8, 2023 Hi @jimmerxx welcome to the forum and thanks for being a Club Greensock member 🎉 Check out the following post And from the docs https://greensock.com/docs/v3/Plugins/ScrollSmoother same goes for sticky elements. position: fixed should be outside the wrapper - since the content has a CSS transformapplied, browsers create a new containing block and that means position: fixed elements will be fixed to the content rather than the viewport. That's not a bug - it's just how CSS/browsers work. You can use ScrollTrigger pinning instead or you could put any position: fixed elements OUTSIDE the wrapper/content. Hope it helps and happy tweening! Link to comment Share on other sites More sharing options...
jimmerxx Posted August 8, 2023 Author Share Posted August 8, 2023 Hi @mvaneijgen Thanks for the reply, I had originally moved the header above the 'smooth-content' div and it still didn't work, but thanks to your example I realised I was missing the 'smooth-wrapper' div 🤦♂️ Thanks again for the swift reply J 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now