Building a grid
Columns and rows
Columns and rows are the tracks of your grid. GridFlow supports 1 to 12 of each.
Change the number of tracks #
In Columns and rows, use the − and + buttons or type a number into Columns or Rows. The count next to the section title, such as 5 × 5, shows the current size.
Numbers below 1 or above 12 are brought back into that range when you leave the box.
What happens to items #
- Adding tracks never moves items. New tracks copy the size of the last track.
- Removing tracks keeps every item that still fits. An item that sticks out past the new last line is trimmed to fit. An item that starts in a removed track is removed.
Tip: If you remove tracks by mistake, add them back with +. Trimmed items keep their position, so you only need to drag their corner again.
Grid lines #
CSS Grid numbers the lines between tracks, starting at 1. A grid with 5 columns has column lines 1 to 6. GridFlow uses these line numbers when you edit an item's position, and in the generated CSS:
.item-2 {
grid-column: 2 / span 3; /* starts at column line 2 and spans 3 columns */
grid-row: 1; /* sits in the first row */
}
In the code #
The number of tracks comes from the length of grid-template-columns and grid-template-rows. Five equal columns are written as repeat(5, 1fr). To change the size of each track, see Track sizes.