CSS grid-auto-flow Property


The auto-placement algorithm positions items by filling each row in turn, adding new rows as needed.

Syntax

Example

Preview

Property Values

Value Description
row The default value. Items are placed by filling each row.
column Items are placed by filling each column.
dense Fill any gaps in the grid with items.
row dense Items are placed by filling each row and any gaps in the grid.
column dense Items are placed by filling each column and any gaps in the grid.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
grid-auto-flow 57.0 52.0 10.0 16.0 44.0