CSS grid-column-gap Property
Example
.grid-container {
display: grid;
grid-column-gap: 50px;
}
1
2
3
4
5
6
7
8
Meaning
The grid-column-gap property specifies the size of the gap between the columns in a grid layout.
Note: This property was renamed to column-gap in CSS3.
Default value: | 0 |
Inherited: | No |
Animatable: | Yes |
Version: | CSS Grid Layout Module Level 1 |
JavaScript syntax: |
|
Standard Syntax
grid-column-gap: length|initial|inherite|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
length | 0 is the default value. Specifies the length in px or %(percentage). |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
grid-column-gap: 0;
}
Note: grid-column-gap property was renamed to column-gap in CSS3.
Example
.grid-container {
display: grid;
column-gap: 50px;
row-gap: 10px;
}