Center a section on smooth scroll

Hey @matthew1818, I just added a way to enable this, but it requires you to configure it a bit manually. For any section that you want to scroll into view in the middle of the view port, add a new custom attribute called data-scroll and set its value to mid. Here’s how you do it:

  1. Select the element that you are scrolling to (not the link that triggers the scroll), go to the Settings tab, and click on + to add a new custom attribute:

  2. Set attribute details and press ‘Save’:

Once you do that (for each section that you want to have this behavior), Webflow should automatically scroll so that this element is in the middle of the page (even on page load if you have a URL to that specific part of the page). You’ll need to refresh your designer for this to work in preview mode, and republish your page for it to work externally.

Enjoy, and let me know if you find any bugs! :smiley:

5 Likes