Every frontend developer runs into the same mobile layout surprise sooner or later: a form or modal looks clean on a desktop browser at 390px width, yet on an actual phone the bottom submit button slides behind the browser toolbar or disappears underneath the on-screen keyboard.
The root cause is almost always height: 100vh .
What 100vh Actually Measures on Mobile
Classic vh units represent 1% of the large viewport height (the height when the browser's address bar and bottom navigation bar are fully retracted). When a user first loads a page, both browser bars are visible, so 100vh is taller than the actual visible screen. Any sticky footer or action bar anchored to the bottom of a 100vh container immediately gets clipped.
Step 1: Switch Full-Screen Containers to dvh and svh
Modern mobile browsers support three dynamic viewport units:
100svh (Small Viewport Height): the visible height when browser chrome is expanded.…