htmlcssmacosgoogle-chrome

Prevent "overscrolling" of web page


In Chrome for Mac, one can "overscroll" a page (for lack of a better word), as shown in the screenshot below, to see "what's behind", similar to the iPad or iPhone.

I've noticed that some pages have it disabled, like gmail and the "new tab" page.

How can I disable "overscrolling"? Are there other ways in which I can control "overscrolling"?

enter image description here


Solution

  • The accepted solution was not working for me. The only way I got it working while still being able to scroll is:

    html {
        overflow: hidden;
        height: 100%;
    }
    
    body {
        height: 100%;
        overflow: auto;
    }