Skip to content

Light version: pages open quickly, without the 3D graphics. You are seeing the light version because the 3D graphics would be slow on this device. The content is the same.

Turn on 3D

Preparing the graphics. This can take a moment on the first visit.

Henry Lõiv

Web design & development

Quick Answer

100vh, 100svh or 100dvh: which should you use on mobile?

Development 1 min read

Use svh for a stable height with browser controls visible; use dvh when the element should follow the changing viewport. Traditional vh can represent a height that lets visible mobile browser controls obscure some content. 12

Choose the behavior, not the newest abbreviation

100svh uses the small viewport. It helps keep an initial-screen button from sitting beneath browser controls, although space may become available when those controls retract.

100dvh follows the dynamic viewport. That can suit a screen-filling panel, but it can also resize layout during scrolling. It is not automatically the best choice for every section. 1

A simple content-section example

.hero {
  min-height: 100vh;
  min-height: 100svh;
}

Using min-height leaves room for longer content. A fixed height combined with hidden overflow can make text or a button unreachable.

Test with browser controls visible and hidden, in landscape, and with enlarged text. For forms, test the on-screen keyboard separately: changing a viewport unit does not solve every keyboard or safe-area layout issue.

Choose the unit according to the movement the visitor should experience. A stable hero section and a dynamically filling dialog do not have to use the same sizing strategy.

Related reading

Frontend development

Sources

  1. web.dev: small, large and dynamic viewport units
  2. MDN: viewport-relative CSS lengths

Fact checked:

Let’s talk about your project

Tell me about your project

Tell me what you’d like to build or improve. You don’t need a finished brief — we’ll work out the scope and next steps together.

01 How can I help?
02 How many pages do you need?
03 Which extras do you need? Choose all that apply
04 When does it need to be ready?
05 Project details
06 Your contact details

Enquiry received

Thank you!

Your enquiry has been received. I usually reply by email within 2 working days.