Streaming live at 10am (PST)

Scrolling long article inside a section

Hello all, I have been trying to use a scroll animation to achieve a section where the left side image (which is 100% height of the section) will stick as the user scrolls and the right side article (longer that the height of the section, overflow hidden) can continue to be scrolled until user reached the bottom of the article then section will unstick. Any help much appreciated. Thanks

Here is my public share link:

Welcome to the community!

This is a situation where you can get away with using position: sticky alone without any interactions, and thankfully you just need to modify a few styles to get it working:

Thanks for the quick and helpful answer!

Hey @mikeyevin - would this solution work if you wanted to add a 100vw footer section below the image and article? That way, when reaching the bottom of the article, the image and article would unstick and move upward to reveal the footer section.

Yep! Essentially the element only sticks when it has room within its “track” (the vertical space it can occupy) so once it reaches the bottom it will stop sticking and scroll normally :+1:

Awesome, got it to work. Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.