Webflow sync, pageviews & more.
NEW

How can I fix the issue with two scrollbars and scrolling on the page beneath instead of the overlay in Webflow, when using the "projects overlay" feature on my portfolio website? Also, how can I resolve the problem of the horizontal scroll getting stuck on the live page? Is there a solution to the lagging vertical scroll in the preview mode, possibly related to the issue with the horizontal scroll?

TL;DR
  • Lock body scroll using overflow: hidden when overlays are active to prevent background scrolling and double scrollbars.
  • Set overflow-x: hidden on html and body, and check for oversized elements to eliminate horizontal scroll.
  • Disable smooth scroll, minimize heavy DOM elements, and avoid GPU-heavy effects to reduce vertical scroll lag.

You're experiencing multiple scroll-related issues in Webflow, including double scrollbars, background scrolling during overlays, horizontal scroll glitches, and lag in preview mode. These are often caused by overflow misconfigurations and missing scroll-locking techniques.

1. Fix Double Scrollbars and Background Scrolling

  • Cause: Double scrollbars usually occur when both the body and a container (like an overlay) are scrollable simultaneously.
  • Solution:
  • Select your Projects Overlay div or modal.
  • Set overflow to auto or scroll only within the overlay container—not the body.
  • When the overlay is active, apply overflow: hidden to the body to prevent background scrolling.
  • Implementation Tip:
  • Use Webflow Interactions to trigger these style changes:
    • On overlay open: Add a class (e.g., scroll-lock) to the body, and in your custom code, define body.scroll-lock { overflow: hidden; }.
    • On overlay close: Remove the class to restore default scrolling.

2. Resolve Horizontal Scroll Getting Stuck

  • Cause: An element is likely set to a width larger than the viewport, causing horizontal overflow.
  • Solution:
  • Check each main section, container, and wrapper element for overflow issues.
  • Look out for any fixed-width elements (common culprits include images, sliders, or flexbox items with min-width or extra margins).
  • On problematic elements, set:
    • overflow-x: hidden on the body and html tags.
    • Use max-width: 100% and overflow-wrap: break-word where appropriate.
  • Live Publish Note: Webflow preview might hide overflows by default, while the live site gets true computed values, which reveals layout issues.

3. Fix Vertical Scroll Lag in Preview Mode

  • Cause: It’s generally tied to unnecessary content overflow, scripts affecting scroll behavior, or heavy DOM elements.
  • Solution:
  • Disable Smooth Scroll in the Body or custom js if enabled, which can cause lag in Webflow preview.
  • Reduce DOM complexity—flatten out unnecessary nesting.
  • Check interactions and remove excessive forced animations or page-loading delays.
  • Disable GPU-accelerated effects (like certain transforms or parallax) to test improvements.
  • Check Overflow on All Elements:
  • Use Webflow’s Navigator panel to expand and review each section, checking for overflow: scroll or elements that spill out of bounds.

4. Apply Preventative Overflow Settings

  • At the Page Level:

  • Select body and html in the Style panel or via custom code.

  • Add these styles:

    • overflow-x: hidden — to prevent horizontal scroll.
    • position: relative — to ensure context is respected.
  • For the Overlay:

  • Ensure the overlay is using:

    • position: fixed
    • top/left/right/bottom: 0
    • z-index high enough (e.g., 9999) to layer over other content.

Summary

To fix overlay scroll issues in Webflow: (1) lock body scroll when the overlay is active, (2) check element widths to stop horizontal scroll, and (3) optimize overflow and transform properties to reduce vertical scroll lag. Double scrollbars and sticky transitions are nearly always the result of overlooked overflow settings or layout misalignment—review each section carefully.

Rate this answer

Other Webflow Questions