Use these instead of vh

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI6 min

About this video

A CSS tutorial explaining why the vh viewport unit can behave unexpectedly and how the dynamic, small and large viewport height units (dvh, svh, lvh) and their logical block-size equivalents offer alternatives. It is aimed at developers who already write CSS for responsive layouts.

What you’ll learn

  • Explain why 100vh can overflow on mobile browsers
  • Choose between dvh, svh and lvh for a full-height layout
  • Apply logical block-size viewport units in CSS