Jump to content
Search Community

Scroll Trigger Pin-spaceing top

Nisseboi test
Moderator Tag

Recommended Posts

Hello 
Ive been working with pleasure with gsap for 4 weeks now and im loving it im just about to finish my project when I notice that my pin elements still have some margin top which I do not have anywhere in my code anyway who can help. 

I have put pin spacing false, as seen in my javascript screenshot all the code that is used in the sections are in screenshots.

2120189652_Skrmbillede2021-12-16kl_10_54_28.thumb.png.21e35c5123fcb5dc5a578f3bf7b8a195.png749799086_Skrmbillede2021-12-16kl_10_54_59.png.e00ce32cc9f529c6493b760bc996afac.png

Skærmbillede 2021-12-16 kl. 10.56.56.png

Link to comment
Share on other sites

Hello @Nisseboi

 

One thing I noticed at a quick glance is that your starts are not really valid since they have 3 parameters - they are supposed to have 2 parameters (one for the element and one for the viewport). This may very well not be the root of your problem though.

 

Another thing from a quick guess is that your h2s up top of your section, which have a margin by default, might be causing this. So maybe try setting the margin/margin-top of your h2s to 0.

 

If it doesn't help, could you maybe pop all this into a minimal demo? ...not your whole project though - you can replace your assets with simple divs as long as you can recreate the issue you are having. It is fairly hard to give you any advice from just looking at screenshots without having any code to actually tinker with.

  • Like 2
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.
×
×
  • Create New...