HTML & CSS · Middle · Question 33 of 75
Why can height: 100vh be taller than the visible area on mobile, and how do you fix it?
- 1Because of page zoom; fixed with
zoom: 1onbody - ✓Correct answer:
vhignores the address bar; thedvh,svh,lvhunits help - 3
vhignores screen DPI; fixed by switching to100vw
Explanation
Mobile browsers compute 100vh from the maximum height (with the toolbar hidden), so the bottom of the block hides under the address bar. The new units: svh - smallest viewport height, lvh - largest, dvh - dynamic, changing along with the toolbar.