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?

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.

Further reading

Problem with a question

HTML & CSS · Middle · question 33

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz