# iOS PWA gap at the bottom in portrait (solved) > An iPhone Home Screen web app (PWA) with `viewport-fit=cover` and the `black-translucent` status bar, opened in portrait, stops one status bar short of the bottom edge (innerHeight 873 instead of 932 on a 430 x 932 pt iPhone) and iOS paints the leftover band with the `html` background. With the root at `100dvh` it stays short until the phone is rotated. Sizing the root with `100vh` in the installed app only fixes it: iOS grows the app to the full screen within about a second and fires a `resize`. Measured on iOS 18.2, December 2026. ## The fix ```css /* iOS PWA bottom gap fix: github.com/LivingSparks10/ios-pwa-status-bar-gap */ html, body { height: 100%; height: 100dvh; } @media (display-mode: standalone), (display-mode: fullscreen) { html, body { height: 100vh; } } ``` - No icon reinstall needed: iOS reads the CSS at every launch. - Measure layouts again on `resize`: the size changes once after launch. - Does not work: elements at `100lvh` with the root at `100dvh`, runtime viewport meta rewrites, `scrollTo`, fake resize events, layout from `screen.height`. Status bar `default` moves the band to the top. ## Docs - [Full write-up (measurements, variants, what did not work)](https://livingsparks10.github.io/ios-pwa-status-bar-gap/) - [README on GitHub](https://github.com/LivingSparks10/ios-pwa-status-bar-gap) - [Test page with the bug (root 100dvh)](https://livingsparks10.github.io/ios-pwa-status-bar-gap/dvh.html) - [Test page with the fix (root 100vh)](https://livingsparks10.github.io/ios-pwa-status-bar-gap/vh.html) - [Report results from another iPhone](https://github.com/LivingSparks10/ios-pwa-status-bar-gap/issues/new?template=device-report.md) ## About - Author: LivingSparks10 (https://github.com/LivingSparks10), found while building a browser flight game - License: MIT - Support the author: https://ko-fi.com/livingsparks