Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If a mobile page set to height: 100vh extends below the visible screen or puts a button behind the browser bars, the issue is usually that the bars change the visible area as someone scrolls. In current default behavior, vh corresponds to the large viewport height, not necessarily the height visible while browser controls are expanded. Choose svh, lvh, or dvh according to how the page should behave; none is best for every design.

Choose the viewport unit that matches the design

What the element should do Unit Trade-off
Fit while browser controls are expanded, avoiding content behind them 100svh May leave open space when the controls retract.
Fill the largest viewport after browser controls retract 100lvh Some content may be obscured when the controls return.
Track the viewport as browser controls appear or disappear 100dvh The element can resize during scrolling, moving content or causing a jarring effect.
Provide a rule for browsers that do not support the newer units 100vh, followed by a supported newer unit The fallback is usable syntax, not a guarantee of ideal sizing in older mobile browsers.

What changes when browser bars move

A mobile browser’s address and navigation bars can expand or retract while a person scrolls. That changes the area currently visible, but the CSS viewport basis used for a height may not follow that change. The CSS Values and Units specification defines small, large, dynamic, and default viewport sizes to let authors choose which state a viewport-relative length represents.

  • svh uses the small viewport height, with dynamic browser controls expanded. It stays stable as those controls retract, so space can be left unused.
  • lvh uses the large viewport height, with controls retracted. It fills that larger state, but its content can be covered when controls are expanded again.
  • dvh uses the dynamic viewport height and changes as browser controls appear or disappear.
  • vh currently corresponds to lvh, so 100vh can exceed the visible area while the bars are expanded.

MDN describes the small viewport units as generally safer when controls are expanded, while noting they may not look as attractive after a person interacts with the page. Its CSS length reference explains the trade-off. The CSS Values and Units Module Level 4 defines the viewport unit families.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a fallback and let content grow

For a hero or panel that should fit with browser controls visible, use min-height so content can extend beyond one screen rather than being forced into a fixed box:

#1 Best Overall
Sale
Motorola Moto g - 2026 | Unlocked | Made for US 4/128GB | 50MP Camera | Pantone Slipstream, Cellular_Phone
  • Universal unlocked. Compatible with all major U.S. carriers, including Verizon, AT&T, T-Mobile and other prepaid carriers.
  • Super-bright, super-smooth 6.7" display. See your screen clearly even outdoors in sunlight, and enjoy seamless views with a fast-refreshing 120Hz display.*
  • AI-powered camera system. Take stunning photos in any light with the 50MP camera**, look your best with a 32MP selfie cam*****, and capture extreme close-ups.
  • Superfast 5G performance. Unleash your entertainment at 5G speed*** with the MediaTek Dimensity 6300 chipset and up to 12GB of RAM with RAM Boost****.
  • Long-lasting battery + TurboPower charging. Power through day after day with a 5200mAh battery, then get hours of power in just minutes.****

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

The browser uses the later declaration if it supports svh; otherwise, it can fall back to the earlier vh rule. That fallback does not erase the older unit’s mobile sizing trade-off. Prefer min-height when text or controls may need more room; use fixed height only when clipping or internal scrolling is intentional.

Rank #2
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Set the mobile layout viewport separately

Include the standard viewport hint in the page head:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

<meta name="viewport" content="width=device-width, initial-scale=1">

This tag and the newer height units solve different problems. The meta tag sets the layout viewport for mobile; the CSS units choose the viewport basis for lengths. Without the tag, some mobile browsers may lay out a page against a virtual viewport typically around 980 CSS pixels and scale it down. See MDN’s viewport concepts reference.

Rank #3
Samsung Galaxy A16 5G 128GB Cell Phone, Unlocked Android Smartphone, Large AMOLED Display, Durable Design, Super Fast Charging, Expandable Storage, US Version, 2025, Blue Black (Renewed)
  • Charger NOT Included, 6.7" Super AMOLED FHD+, 90Hz Refresh Rate, 385 ppi, 800 nits (HBM), 1080x2340px, 5000mAh Battery
  • 128GB, 4GB RAM, microSDXC, Exynos 1330 (5nm), Octa-Core, Mali-G68 MP2 or Mali-G57 MC2 GPU
  • Rear Camera: 50MP, f/1.8 (wide) + 5MP, f/2.2 (ultrawide) + 2MP, f/2.4 (macro), LED flash, panorama, HDR; Front Camera: 13MP, f/2.0, Android 14, up to 6 major Android upgrades, One UI 6.1
  • 3G: HSDPA 850/900/1700(AWS)/1900/2100; 4G LTE: 1/2/3/4/5/7/12/13/14/20/25/26/28/29/30/38/39/40/41/48/66/71, 5G: 2/5/25/41/66/71/77/78 SA/NSA/Sub6/mmWave - Nano-SIM + eSIM
  • US Model – Global Connectivity – Compatible with Most GSM Carriers like T-Mobile, AT&T, MetroPCS, etc. Will Also work with CDMA Carriers Such as Verizon, Straight Talk.

Do not assume dvh handles the on-screen keyboard

The virtual keyboard is a separate viewport issue. Chrome for Developers says dynamic viewport units do not account for the virtual keyboard by default; the visual viewport can shrink while the layout viewport remains unchanged. For a keyboard-aware dialog or form, treat visual-viewport behavior as a separate requirement rather than assuming 100dvh will keep it fitted. See Chrome for Developers’ I/O 2023 CSS and UI overview.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check support in the browsers you target

Chrome for Developers’ published support panel lists Chrome 108, Edge 108, Firefox 101, and Safari 15.4 for the newer viewport-unit feature. These are the versions reported in that article, not a guarantee for every embedded browser, browser fork, or later release. Test the actual target browsers and devices, particularly in-app browsers and pages with keyboard-driven forms.

Best Value
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
Rank #4
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
  • Check the page with browser controls expanded and retracted.
  • Confirm bottom controls remain reachable in each state.
  • Watch for unwanted resizing or content movement if using dvh.
  • Open forms and dialogs with the virtual keyboard to check them independently.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.