CSS grid-gap property

CSS grid-gap

CSS grid-gap property is a shorthand property, used to set space between grid rows and grid columns.

grid-gap shorthand property are,

  • grid-row-gap : Default value is 0, it is used to set the space between the rows.
  • grid-column-gap : Default value is 0, it is used to set the space between the columns.

Example

Try Yourself

In the above example values used in grid-gap property are,

5px - grid-column-gap

40px - grid-column-gap