Michael31 Posted February 4, 2021 Share Posted February 4, 2021 Hello, I'd like to reproduce a css sticky behavior. Unfortunately as you can see on my codePen, it doesn't keep pinned until the end of my section despite the end attribute. Does anyone see what I'm missing ? Thanks a lot See the Pen bGBEdRZ by michaelgrc (@michaelgrc) on CodePen Link to comment Share on other sites More sharing options...
elegantseagulls Posted February 4, 2021 Share Posted February 4, 2021 Hi @Michael31, For your particular markup, you're missing: pinSpacing: false, 4 Link to comment Share on other sites More sharing options...
Michael31 Posted February 5, 2021 Author Share Posted February 5, 2021 Hey @elegantseagulls, thanks for your answer. So I added this attribute but it seems to add a new issue on both my codePen (you can see it right above) and my project. It adds an extra height at the end of my page. When I inspect it, it seems to be the section set inside the trigger attribute. Do I miss something ? Thanks a lot Link to comment Share on other sites More sharing options...
Solution mikel Posted February 5, 2021 Solution Share Posted February 5, 2021 Hey @Michael31, You trigger the section trigger: '.pinSection' and you should pin the element pin: '.pinElmt' See the Pen QWGyQKo by mikeK (@mikeK) on CodePen Happy pinning ... Mikel 4 Link to comment Share on other sites More sharing options...
Michael31 Posted February 5, 2021 Author Share Posted February 5, 2021 Hey @mikel, This last tip did the trick ! Thanks a lot for your time. 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