We use cookies to improve your experience. Learn more in our Privacy policy.
grid-auto-flow
The grid-auto-flow CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.
Initial value | row |
Applies to | grid containers |
Syntax
grid-auto-flow: column;
Values
Items are placed by filling each row in turn, adding new rows as necessary. If neither row nor column is provided, row is assumed.
Items are placed by filling each column in turn, adding new columns as necessary.
"dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause items to appear out-of-order, when doing so would fill in holes left by larger items.
Browser support
grid-auto-flow | chrome57 | edge16 | firefox52 | ie | opera44 | safari10.1 |