All cases
RL-001 / Overflow & ReflowEvidence verified

Why `100vw` Can Create Horizontal Scrolling

A viewport-wide child ignores the inline space already consumed by its padded page container and makes the document wider than the visible area.

Experiment mode

Fixture viewport

Failingwidth: 100vw
Viewport / page
--
Band
--
Page overflow
--
Fixedwidth: 100%
Viewport / page
--
Band
--
Page overflow
--

Three-browser evidence verified. Live values come from your current browser. The formal matrix records the controlled browser runs and fixture revision used for the published conclusion.

Observed failure

The viewport-wide child starts after the page gutter

The target starts inside a padded content shell but still claims the entire viewport width. Its left offset is therefore added to that width, and the document becomes wider than its viewport.

Minimal code diff

Size the child from its containing block

Use percentage or logical inline sizing when the intended boundary is the parent content box, not the browser viewport.

Before

.full-band {
  width: 100vw;
}

After

.full-band {
  width: 100%;
}

Root cause

Viewport units are resolved against a viewport, while percentage inline sizes are resolved against a containing block. Those boundaries happen to coincide in simple layouts, but they are not interchangeable once a child begins after a page gutter or inside another constrained wrapper.

The failing fixture deliberately places a 100vw band inside a padded shell. The band begins 16 CSS pixels from the left edge and then remains one full viewport wide, so the document needs additional horizontal space.

Diagnose the actual boundary

Start by comparing document.documentElement.scrollWidth with clientWidth, then inspect the target’s getBoundingClientRect(). In this fixture the useful signal is not the declaration alone: the band has a positive left offset and its right edge lands beyond the document’s visible inline edge. Inspect the parent at the same time. If the parent’s content box is the intended boundary, a percentage or inline-size: 100% expresses that relationship directly.

Temporarily hiding horizontal overflow can make the scrollbar disappear while leaving controls, focus rings, or text outside the reachable area. The regression therefore measures geometry and confirms that the complete band remains visible; it does not treat overflow-x: hidden on the page as a repair.

When this fix is not enough

Use 100vw when the viewport really is the intended sizing boundary. A full-bleed section may instead need a deliberate breakout pattern that accounts for its offset. If changing the width does not remove the overflow, inspect transforms, fixed media, negative margins, and descendants with large intrinsic sizes.

Regression condition

At each tested viewport, the failing document should report positive page-level overflow and the fixed document should report zero page-level overflow. The target element remains visible in both states.

Primary references

Sources checked for this case

  1. CSS Values and Units Module Level 4 - viewport-percentage lengths - W3C, checked 2026-08-04
  2. CSS Overflow Module Level 3 - W3C, checked 2026-08-04

Formal evidence

Browser and viewport matrix

Three-browser run

Cells show failing / fixed page overflow in CSS pixels.

Browser32037576810241440
Chromium+16 / +0+16 / +0+16 / +0+16 / +0+16 / +0
Firefox+16 / +0+16 / +0+16 / +0+16 / +0+16 / +0
WebKit+16 / +0+16 / +0+16 / +0+16 / +0+16 / +0
12/12 recorded assertions passed
  • chromium-failing-overflow-32016px
  • chromium-fixed-overflow-3200px
  • chromium-failing-overflow-37516px
  • chromium-fixed-overflow-3750px
  • firefox-failing-overflow-32016px
  • firefox-fixed-overflow-3200px
  • firefox-failing-overflow-37516px
  • firefox-fixed-overflow-3750px
  • webkit-failing-overflow-32016px
  • webkit-fixed-overflow-3200px
  • webkit-failing-overflow-37516px
  • webkit-fixed-overflow-3750px