CSS grid-column-gap Property
Example
Set the gap between columns to 50px:
.grid-container {
grid-column-gap: 50px;
}
Try it Yourself »
Definition and Usage
The grid-column-gap
property defines the size of the gap between the columns in a grid layout.
Default value: | 0 |
---|---|
Inherited: | no |
Animatable: | yes. Read about animatable Try it |
Version: | CSS Grid Layout Module Level 1 |
JavaScript syntax: | object.style.gridColumnGap="50px" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
grid-column-gap | 57 | 16 | 52 | 10 | 44 |
CSS Syntax
grid-column-gap: length;
Property Values
Value | Description | Play it |
---|---|---|
length | Any legal length value, like px or %. 0 is the default value. Read about length units | Play it » |
Related Pages
CSS tutorial: CSS Grid Layout
CSS reference: The grip-gap property
CSS reference: The grip-row-gap property