Dev Helpers

CSS / Overflow and scrolling

Clip content without a scroll container

Dev Helpers · July 23, 2026

Overflow clipping trims paint without providing the scrolling behaviour of a scroll container. This affects how hidden content can be reached.

Worked example

<style>
  .demo {
    overflow: clip;
    height: 3rem;
  }
</style>
<div class="demo">Line one<br />Line two<br />Line three</div>

Implementation notes

Clipped descendants may still receive keyboard focus. Keep focusable controls outside decorative clipping wrappers when their focus ring could disappear.

Try it yourself

Tab to a focusable item near the clipped edge.

Open the CSS example →

Editorial date July 23, 2026 · Published December 6, 2026

Related articles

Fluid width with a maximum

A fluid container needs a small-screen width and a large-screen maximum. Outer gutters should remain visible at both extremes.

Square aspect ratio

A square ratio reserves equal sides even before media loads. Fit rules decide whether rectangular content is cropped or letterboxed.