Example

A simple grid-gap property example:

Laboratory

description & Usage

To determine the gap between columns, rows and rows in a grid layout, we use the grid-gap property.

Informations

# Description
Default Value 0 0
Inherited no
Animatable yes
Version CSS Grid Layout Module Level 1
JavaScript syntax object.style.gridGap="50px 100px"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
grid-gap

Syntax

Values

Values Description
grid-row-gap Determines the size of the gap between the rows in the grid layout, the default value of which is 0.
grid-column-gap Determines the size of the gap between the columns in the grid layout, the default value of which is 0.