Disable scroll when mobile menu open
-
Hi,
is it possible to disable scroll when the mobile menu is open?
I've tried:
body.mobile-menu-open {
overflow: hidden !important;
}Position:fixed works but this means the page jumps to the top of the page.
Any help you can give would be much appreciated.
-
i think the overflow property you need to overwrite is on the html element, not the body element
why do u want to do this mmh
-
i think the overflow property you need to overwrite is on the html element, not the body element
why do u want to do this mmh
@arminunruh said in Disable scroll when mobile menu open:
mmh
Hi, Apologies for the slow reply.
I feel like its good to keep the same page position when the mobile menu is open. I'm also getting a gap at the bottom of the menu when the mobile menu is open and scrolled, please see screen grab attached.
Thank you, love Lay Theme
-
ah i understand! i wrote it down and will consider it :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login