The grid-row
and grid-column
properties define which row or column an element will be displayed on.
.element {
grid-row: 1 / 2;
grid-column: 3 / -1;
}
Here’s an explicit 3 × 3 grid where these properties are used to place grid items onto it in specific places:
Browser support
This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.
Desktop
Chrome | Firefox | IE | Edge | Safari |
---|---|---|---|---|
57 | 52 | 11* | 16 | 10.1 |
Mobile / Tablet
Android Chrome | Android Firefox | Android | iOS Safari |
---|---|---|---|
123 | 124 | 123 | 10.3 |
More information
Related
column-gap
.example { column-gap: 25px; }
gap
.element { gap: 20px 30px; }
grid
.element { grid: auto-flow dense / repeat(5, 150px); }
grid-auto-columns
.element { grid-auto-columns: minmax(100px, 200px); }
grid-column
.element { grid-column: 3 / 5; }
grid-column-end
.element { grid-column-end: 4; }
grid-column-start
.element { grid-column-start: 3; }
row-gap
.element { row-gap: 2rem; }