Sphere
Log in Join
☆ 13

Why is 100vh too tall on mobile Safari?

My full-screen section is taller than the visible area on iOS. It looks fine in Chrome devtools. I use height: 100vh.

⚑ Report

3 replies

☆ 0
S Samir ·2026-10-28#1

100vh uses the largest viewport with the browser UI hidden. Use 100dvh for the dynamic viewport, with 100vh as a fallback.

⚑ Report
☆ 0
J Jules ·2026-10-28#2

dvh works but the layout shifts slightly when the address bar hides.

⚑ Report
☆ 0
O Oskar ·2026-10-28#3

That is expected with dvh. If you need a stable size, use svh and accept some extra space, or anchor the layout to the visual viewport in JS.

⚑ Report
Log in to reply.