- Why scroll bar is appearing when not needed?
- How do I stop scrolling when a pop up is open?
- How do I make a scrollable menu without scrolling the body?
Why scroll bar is appearing when not needed?
By default, a scroll bar will appear when the content is too long. Page authors can override this in a number of ways, for example: overflow-y: hidden => cut off content that is too long. overflow-y: scroll => always show a scroll bar even when it's not needed.
How do I stop scrolling when a pop up is open?
Approach: A simple solution to this problem is to set the value of the “overflow” property of the body element to “hidden” whenever the modal is opened, which disables the scroll on the selected element.
How do I make a scrollable menu without scrolling the body?
With CSS: $('html, body'). css( overflow: 'hidden', height: '100%' ); This will disable scrolling and bring you to the top of the page.