Skip to content
Box model

width

Sets an element's content width. Whether padding and borders are included depends on `box-sizing`.

4,877 effects in the catalog use this property.

Syntax

width: <length> | <percentage> | auto | min-content | max-content | fit-content;

Watch out

Percentages resolve against the containing block's width. If that width itself depends on the child, the browser may encounter a circular dependency and fall back to automatic sizing.

Effects using width

These are working effects from the catalog. Open a tile to inspect the full source.