HeadlinesBriefing favicon HeadlinesBriefing.com

iOS Safari Full‑Height Video Fix That Actually Works

DEV Community •
×

Developers trying to embed a full-height video on iOS Safari spend hours chasing broken advice. The bottom of the hero clip often disappears behind the browser toolbar, or a gap shows up. Articles recommend units like 100vh, 100svh, 100dvh, 100lvh, or hacks such as -webkit-fill-available, window.innerHeight, and env(safe-area-inset-bottom), yet none consistently fill the screen on newer iPhones.

After testing every fallback, the author settled on a single rule: `.hero { min-height: calc(100lvh + 60px); }`. By deliberately oversizing the container and nudging bottom‑aligned elements from 15% to 25% on mobile, the video extends past the toolbar, leaving a few invisible pixels that users never notice.

The trick isn’t elegant, but it sidesteps Apple’s shifting viewport specifications that have frustrated the web community for years. Because the fix works across iPhone models, developers can stop layering JavaScript workarounds and focus on content. Watch future iOS releases; if Apple stabilizes viewport units, a cleaner solution may reappear.