Super excited about IX 2.0 - because I think it is going to allow me to finally implement an animation that I have been waiting to do on multiple projects multiple times.
So, what I am trying to do is to fix an element, which in the below example is a div block that contains both the form (cta: get updates) and link (cta: try it for free) when scrolling within that section - it’s the section with the blog content.
Once I have reached the bottom of that section, I want the above mentioned div block to scroll up.
I believe Webflow is using a similar if not the same animation for the share function of their own blog.
I have honestly been trying to do all the necessary research to make it happen myself, but am a bit lost, as I don’t know how to animate an element (div block) with an element (section) that I am animating.
Usually better to achieve that using the position: sticky property but it doesn’t have the best browser support at this time so we don’t have it available natively yet.
So usually something like this does the trick to keep something fixed within a given relative positioned parent:
Hey I am trying to achieve the same thing and am getting hung up. Saw that you were able to figure it out! I’ve adding the code to the footer and changed the class from “.course-sidebar-wrapper” to mine which is “.sticky-side-bar-wrapper”. Did you do any other edits to the code to get it to work? This is what I put in my footer:
The important thing is to make sure that .sticky-side-bar-wrapper is “relatively” position versus the element it sits in. Lemme check it out on your site. Took a bit, but after you get it the first time it’s a breeze.
I was able to figure out the sticky effect, but I’m having an issue where I want a div to stick to the bottom of another div, and it will only stick to the top. Can anyone see what I’m doing wrong here?
This is just a test page to solve the issue. I want the red bar to be sticky to the bottom of the page, until the user scrolls past the white section.
@aaronocampo Thanks for the input. That’s what I had already. But I’m trying to get that red bar to stick to the bottom of the browser window, not the top. I changed the class to bottom: 0px, but it still sticks to the top.