How can I fix the issue with the section link scroll on my Webflow site when using Tablet to Mobile breakpoint where the page scrolls past the intended section? I have already tried changing the image load settings to Eager but it didn't work. Thank you!

TL;DR
  • Adjust section padding/margin and ensure navbar positioning is fixed or sticky to correct scroll positioning.
  • Review and update link settings to ensure accuracy.
  • Implement custom code to smooth scroll and adjust for navbar height.
  • Test across various devices to confirm consistent scrolling behavior.

Experiencing issues with section links scrolling past the intended section on your Webflow site can be frustrating, especially on tablet and mobile breakpoints. Here’s how to address this issue effectively:

1. Adjust Section Padding/Margin

  • Check the top padding/margin of the targeted sections. Often, sections exceed their intended position due to overlapping padding or margin settings.
  • Reduce the top padding or use a negative top margin to correct the scrolling position.

2. Fix Navbar Positioning

  • Ensure your navbar is set to 'Fixed' or 'Sticky.' When using a fixed navbar, adjust the scrolling position to account for its height.
  • If necessary, use a transparent spacer div before the intended section equal to the height of the navbar to counteract scrolling past it.

3. Review Link Settings

  • Ensure section links are correctly linked. Double-check that each link points to the correct section ID.
  • Re-add the link if necessary by unlinking and then linking again to refresh its settings.

4. Custom Code Adjustment

  • Use custom code to adjust the scroll behavior smoothly. Add to “Inside </head> tag” in your project settings:
  • document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth', offsetTop: document.querySelector('.navbar').offsetHeight }); }); });
  • Modify .navbar with your specific navbar class or ID.

5. Test Across Devices

  • Preview the site on different devices within Webflow’s designer to ensure consistent behavior.
  • Use external devices to test real-world performance.

Summary

By adjusting section padding, fixing navbar settings, verifying link accuracy, and possibly introducing custom code adjustments, you can ensure your Webflow site’s section links work smoothly across all devices. This should eliminate issues with scrolling past intended sections in mobile breakpoints.

Rate this answer

Other Webflow Questions