JustHugo Posted April 27 Share Posted April 27 Hi, i try to make a pinned element on my page. If you go to the section "Découvrez mon histoire" all down (or discover link in the menu) the section on the right should be pinned. but i don't understand why, the fixed position is relative to the page instead of the screen. I tried to do the same on codepen, and everything works well. Do you have any idea ? https://justhugo.fr/ See the Pen GRYEqKQ by Hugo-R (@Hugo-R) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted April 27 Share Posted April 27 Hey there! Your end marker was hitting before the start marker. I'd also use different triggers than you've set up at the moment. Maybe try this instead. See the Pen OJBgRgV by GreenSock (@GreenSock) on CodePen Hope this helps! Link to comment Share on other sites More sharing options...
JustHugo Posted April 27 Author Share Posted April 27 Hi @Cassie, thank you for your answer, your code didn't change anything unfortunately. have you see my website to understand where and what is my problem ? my codepen is only here to show that i tried on it and everything works as i want. But i don't understand why on my wordpress website, fixed position don't works and is not relative to viewport. Link to comment Share on other sites More sharing options...
Cassie Posted April 27 Share Posted April 27 Ah, that's a shame, I hoped that was it. Sometimes issues with position fixed can come from the element being housed in a container with transforms on, it's pretty hard to debug a live site though, sorry. Have you triedpinType:transform Maybe that will help? Link to comment Share on other sites More sharing options...
JustHugo Posted April 27 Author Share Posted April 27 Oh thanks didn't know that could exist. So using "pinType:"transform"" make the deal. The only issue i have is that it's not smooth. i have to find how to make it smoother And btw how the my fixed position issue be relative to parent transform property while the parent is generated by gsap ( the div with .pin-spacer class) Link to comment Share on other sites More sharing options...
JustHugo Posted April 27 Author Share Posted April 27 Okay i understood where was my issue. I have a transform property on the Great Great Great Great parent div with id "page". Thank you for your precious help ! 2 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