For most full-height mobile layouts, you can replace a JavaScript height workaround with the CSS viewport unit that matches the behavior you want: use 100svh to fit while browser controls are expanded, 100lvh to size against the largest viewport, or 100dvh to follow the viewport as browser controls change. The default 100vh corresponds to the large viewport, so it may be taller than the space available with browser controls showing.
Why 100vh can be too tall on mobile
Mobile browsers may show or retract their address and navigation bars as a person scrolls. The large viewport describes the viewport with retractable browser interfaces hidden. Because vh is equivalent to lvh, an element set to height: 100vh can extend behind browser controls when they are visible. MDN explains the relationship between vh and lvh.
CSS now offers small, large, and dynamic viewport units so a layout can choose how it responds to that browser UI. The right choice depends on whether you prioritize keeping the content in view, filling the largest possible area, or tracking changes as they happen. MDN documents the definitions and tradeoffs of these viewport units.
Choose the viewport unit that fits the layout
| Unit | When browser controls are expanded | Stability while scrolling | What happens when controls retract |
|---|---|---|---|
svh |
Sizes against the small viewport, helping keep the section within the available space. | Stable as retractable browser UI changes. | May leave unused space. |
lvh |
Sizes against the largest viewport, so browser controls may cover part of the sized area. | Does not track the changing browser UI. | Fills the largest viewport. |
dvh |
Tracks the dynamic viewport as browser UI expands or retracts. | Can resize during scrolling. | Adjusts with the current viewport; resizing may disrupt some interfaces or affect performance. |
Use svh when fitting with controls open matters
For a hero or section that should fit while the browser’s retractable controls are visible, use the small viewport unit:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
- 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
- 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
- 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
- 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)
.hero {
min-height: 100svh;
}
This keeps the sizing stable as the browser UI changes. The tradeoff is that the section may not fill the extra space available after the controls retract.
Use dvh when the layout should track the viewport
Choose the dynamic unit when the element should follow the currently available viewport height:
Rank #2
- SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
- HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
- BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
- COMPATIBILITY — Works with all devices that have a USB-C port.
- INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.
.fullscreen-panel {
min-height: 100dvh;
}
That responsiveness can also be a drawback: the panel may change size while a person scrolls. Avoid treating 100dvh as a universal fix, especially for interfaces where movement or resizing is distracting.
Use lvh when filling the largest viewport is intentional
100lvh explicitly requests the largest viewport height. It is appropriate when filling that maximum area is the intended design, and acceptable when visible browser controls may overlap the element’s area.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
- Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere, perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
- Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style.
- Black PopSockets: Simple, refined, and endlessly versatile. A timeless essential for any phone.
- Travel Must-Have for People On the Go: A must-have travel accessory for flights, flying, airports, air travel, airplanes, planes, international trips, cruises, and long travel days. Key gadget for your airport haul, travel accessories and must-haves.
Keep a fallback for browsers you support
If your project supports older or unverified browsers, retain a deliberate fallback and check the units against your browser-support policy before relying on them. For example, a fallback can declare 100vh first and then override it where the newer unit is supported:
.hero {
min-height: 100vh;
min-height: 100svh;
}
The fallback may retain the original mobile behavior in browsers that do not support svh; test the result on the browsers your project targets. The cited references describe the units and their tradeoffs but do not establish a complete version-by-version support matrix.
Rank #4
- [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
- [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
- [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
- [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
- [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly
Set the mobile viewport correctly
For a responsive mobile page, include a viewport meta tag with width=device-width:
<meta name="viewport" content="width=device-width, initial-scale=1">
Without appropriate viewport configuration, some mobile browsers use a wider virtual layout viewport. See MDN’s viewport meta element reference.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Best Value
- 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
- 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
- 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
- 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
- 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.
When JavaScript is actually needed
Changing a normal full-height section to use svh, lvh, or dvh is a CSS sizing decision; it usually does not require measuring the screen in JavaScript. A separate case is an interaction that specifically needs the visual viewport’s pixel height, such as one whose behavior depends on the area currently visible around an on-screen keyboard.
The visual viewport can shrink independently while the layout viewport remains unchanged. In that narrower case, VisualViewport.height provides the visual viewport measurement. It is not a general replacement for choosing the right CSS unit for a full-height section. MDN describes the visual and layout viewport distinction, and documents VisualViewport.height.
Quick Recap
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.

