Reserve Stable Space for Ads and Third-Party Embeds
A project-authored delayed panel shows how inserting unknown content into a zero-height slot moves the article below it, while an initial minimum height preserves layout.
min-block-size: 0- Viewport height
- --
- Slot before / after
- --
- Target movement
- --
min-block-size: 160px- Viewport height
- --
- Slot before / after
- --
- Target movement
- --
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 empty slot has no height before insertion
The failing fixture inserts a 160-pixel project panel into a zero-height slot. The following article moves downward by the full inserted height even though no article style changes.
Minimal code diff
Give the slot a tested initial size
The fixed slot reserves 160 pixels before the delayed panel is inserted. The insertion fills that existing region and leaves the following article in place.
Before
.embed-slot { min-block-size: 0; }After
.embed-slot { min-block-size: 160px; }Root cause
Late content in normal flow needs space. If the initial slot is empty and has zero height, inserting a panel increases the slot’s block size and moves every following element. The movement comes from the page’s own geometry, not from whether the inserted content is an ad, video, map, or project widget.
The fixed fixture gives the slot the exact height of this controlled panel. It does not imply that every production ad should use 160 pixels. A real integration may need format-specific sizes, responsive aspect ratios, breakpoint rules, or a conservative minimum based on measured delivery data.
Empty and unfilled slots
Space reservation creates a tradeoff when no content arrives. A publisher can retain the region, collapse it before it enters the viewport, or choose a smaller expected size. Each choice should be tested with actual fill behavior. Hiding an oversized blank area by placing content over it is not a layout-stability fix.
Measurement support
Every browser records slot height before and after insertion plus the downstream article’s movement. Chromium additionally records Layout Instability API entries that do not follow recent input. The fixture never requests third-party content.
When this fix is not enough
Content that becomes taller than its reservation can still shift the page. Content rendered inside an iframe can also shift internally without moving the outer document. Test both the outer slot and the embedded experience, and do not infer production revenue or viewability from this geometry fixture.
Regression condition
At 320 and 375 CSS pixels, inserting the project panel into the failing slot must move the following article by 160 pixels. The fixed slot must begin and end at 160 pixels and produce zero target movement. Both states must have zero horizontal page overflow.
Primary references
Sources checked for this case
- Optimize Cumulative Layout Shift - ads, embeds, and late-loaded content - Google web.dev, checked 2026-08-06
- Layout Instability API - Web Platform Incubator Community Group, checked 2026-08-04
Formal evidence
Browser and viewport matrix
Cells show failing / fixed target movement in CSS pixels.
| Browser | 320 | 375 | 768 | 1024 | 1440 |
|---|---|---|---|---|---|
| Chromium | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 |
| Firefox | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 |
| WebKit | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 | +160 / +0 |
20/20 recorded assertions passed
chromium-failing-movement-320160pxchromium-fixed-movement-3200pxchromium-horizontal-reflow-3200px / 0pxchromium-layout-instability-api-3200.0683203125 / 0chromium-failing-movement-375160pxchromium-fixed-movement-3750pxchromium-horizontal-reflow-3750px / 0pxchromium-layout-instability-api-3750.05566090534979423 / 0firefox-failing-movement-320160pxfirefox-fixed-movement-3200pxfirefox-horizontal-reflow-3200px / 0pxfirefox-failing-movement-375160pxfirefox-fixed-movement-3750pxfirefox-horizontal-reflow-3750px / 0pxwebkit-failing-movement-320160pxwebkit-fixed-movement-3200pxwebkit-horizontal-reflow-3200px / 0pxwebkit-failing-movement-375160pxwebkit-fixed-movement-3750pxwebkit-horizontal-reflow-3750px / 0px
Run 2026-08-04T11-36-57-234Z. chromium 149.0.7827.201, firefox 153.0, webkit 26.5. Open raw manifest