Enigma Enigma - 1 year ago 73
CSS Question

Top and Bottom Padding issues on mobile

I've been running into issues where I cannot scroll all the way up or down in one swipe on mobile. I'm assuming the issue has to do with a mix of the mobile navigation I created and the url bar on the phone showing and hiding depending on if you're scrolling up or down.

Has anyone run into this issue/found a working solution for it?

Answer Source

The problem disappeared when I changed two rules

@media only screen and (max-width: 850px)
body, html {
    min-height: 100vh;
    min-width: 100vw;


html, body {
    min-height: 100%;
    min-width: 100%;

Just use min-height and min-width instead of declaring them explicitly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download