no-scroll
class with overflow: hidden
, and optionally position: fixed
and width: 100%
to prevent layout shifts.Yes, you can disable page scrolling in Webflow when a left-side menu (like a mobile menu or sidebar) is open by using custom code and interactions.
no-scroll
Class in Your Projectno-scroll
.Body
element.position: fixed
and width: 100%
to avoid unintended layout shifts.no-scroll
to the Body
(select Body (All Pages) from the element selector).no-scroll
from the Body
.If you need more control, you can add custom code:
Go to: Page Settings > Before
tag, and insert this:
```html
```
Replace .your-menu-button
with the actual class of your menu trigger.
Ensure the no-scroll
class exists in your Webflow styles with the styles mentioned above.
To block scrolling when a left-side menu is open, create a no-scroll
class with overflow: hidden
and use Webflow interactions or custom JavaScript to toggle that class on the Body
. This prevents the page behind the menu from scrolling while the menu is open.