# Size containment

contain: size: the element's size ignores its contents.

## What is **size containment**?

**Size containment** (`contain: size`) says an element's size doesn't depend on its contents, so the browser can size it without looking inside.

```css
.ad-slot { contain: size; width: 300px; height: 250px; }
```

Level: Master · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/master)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/size-containment
