grid-column-start

Term side of the Card.
Topic: Grids
Unit title: grid-column-start
Categories: Property
Explanation side of the Card

Explanation: The property that defines the starting point for a grid item within the columns of a grid layout. It marks where the item begins on the grid, enabling to place it at a specific column line or span multiple columns.

Browser compatibility:
  • The chrome browser supports this feature starting from version 57.
  • The edge browser supports this feature starting from version 16.
  • The firefox browser supports this feature starting from version 52.
  • The safari browser supports this feature starting from version 10.1.
Availability: 

Example

Wrongcss
.item {
  grid-column-start: 0;
}
Rightcss
.item {
  grid-column-start: 2;
}

Grid lines are numbered from 1, so 0 is invalid and the declaration is ignored.

Common mistakes

  • Using 0 as the first column line, which is invalid.

Key points

  • Placement uses the shorthand grid-column unless only the start line is needed.
  • Line numbers start at 1, not 0.

Interview questions

Can grid-column-start use a named line?

Yes. If the template names a line like [content-start], you can write grid-column-start: content-start.

What does grid-column-start: span 2 do?

The item spans two columns, ending at the line set by grid-column-end.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy