Jloafs Posted January 11 Share Posted January 11 Hi guys I'm having a few issues trying to work out how to pin an object when using scrolltrigger and scroll smooth. Essentially I want the header element to be fixed to the bottom of the viewport until it hits the footer, then it will push up just like position sticky behaviour. I have the feeling my pen is way off. I seem to have a huge viewport height element between the header and the <main> element for some reason and the positioning is not working at all as expected. Does anyone have any thoughts on how to resolve? Many thanks in advance for any help. See the Pen GRejWYp by jloafs-DM (@jloafs-DM) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted January 11 Solution Share Posted January 11 Here's one way you could do it: See the Pen dyrpLNQ?editors=0110 by GreenSock (@GreenSock) on CodePen  Thanks for being a Club GSAP member! 💚 1 Link to comment Share on other sites More sharing options...
Jloafs Posted January 16 Author Share Posted January 16 Oh Fantastic! Thanks heaps. 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