CSS grid-area Property


The grid-area CSS property is a shorthand property for grid-row-start , grid-column-start , grid-row-end and grid-column-end , specifying a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area.

The grid-area property is used to set a grid item size and location in a grid layout. The grid-area property is also used to set a name to a grid item.

CSS Syntax

grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end | itemname;
Property Values:
  • grid-row-start: It sets the row on which the item is displayed first.
  • grid-column-start: It sets the column on which the item is displayed first.
  • grid-row-end: It specifies the row-line to stop displaying the item, or span how many rows.
  • grid-column-end: It sets the number of columns to span.
  • itemname: It sets a name for the grid item.

Supported Browsers:

  • Firefox: 52.0, 2.0 -moz-
  • Google Chrome: 50.0, 4.0 -webkit-
  • Internet Explorer: 10.0
  • Safari: 9.0, 3.1 -webkit-
  • Opera: 37.0, 15.0 -webkit-, 11.1

Example -