Jump to content


ScrollSmoother + position fixed + margin-top

Go to solution Solved by Cassie,

Recommended Posts



I have a problem with my code (see codepen), if i disable the scrollsmoother it works like i want, but when enabled i get in trouble with my .section-2 because it uses a margin-top: 100vh; which causes the the scrollable content to be short 100vh so  am missing the last section.
What am i missing here?



See the Pen NWyzvRW by marco77mdst (@marco77mdst) on CodePen

Link to comment
Share on other sites

  • Solution

Hey there!


Welcome to the forums, thanks for joining Club GreenSock, we appreciate the support.

Here's a solution for you using ScrollTrigger to pin the item instead.

See the Pen WNMyzzP by GreenSock (@GreenSock) on CodePen

  • Like 1
Link to comment
Share on other sites

Thank you very much for this  solution!

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.