overflow: hidden to the Body when the overlay is active and reset it on close; make the overlay position: fixed and full viewport. overflow-x: hidden on the Body to eliminate horizontal scrollbars and inspect for oversized or misconfigured elements. You’re likely facing two related issues: unexpected double scrollbars and overlay scrolling behavior, and horizontal scroll glitches. These are typically caused by layout overflows or incorrect body locking when overlays are opened via interactions.
When a modal (like your "projects overlay") opens, there can be scroll conflicts between the overlay and the page body.
overflow: hidden on the Body when the overlay is active. This prevents the background page from scrolling.
Horizontal scroll issues often result from elements overflowing the viewport, possibly:
100vw sections inside nested divs).
Steps to fix:
100vw or using fixed widths inside flexible containers.
Ctrl + Shift + C) to detect which elements cause overflow.
Laggy scroll is sometimes linked to:
Steps to resolve:
scale, blur, or opacity transitions on large containers).loading="lazy") on big images.
To fix the double scrollbars and background scrolling issue, make sure your overlay uses position: fixed, stretches full screen, and applies overflow: hidden on the Body when active. For stuck horizontal scroll, add overflow-x: hidden to the Body and check for oversized children elements. For vertical scroll lag, simplify animations and heavy transforms, and use lazy loading for large content.