Web features explorer

Layout containment

Widely available since 2024-09-14
Tags: css Groups: CSS > Containment

The contain: layout CSS declaration isolates the inside of an element such that it cannot affect the layout of the rest of the page or be affected by the rest of the page. This permits the browser to avoid slower layout calculations.

Learning resources on MDN

Browser support