Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS grid-column-gap property

CSS grid-column-gap property

Example

Set the grid gap between columns to 50px:

.grid-container

{

display:

grid

;

grid-column-gap:

50

px

;

}

Try it »


Browser support

The numbers in the table indicate the first browser version that supports this property.

property
grid-column-gap 57 16 52 10 44

Property definition and usage

The grid-column-gap property defines the grid gap between columns.

Note: This property was renamed in CSS3 to column-gap .

Default value: 0
Inherited: no
Animatable: support. Read about animatable Try it
Version: CSS Grid Layout Module Level 1
JavaScript syntax: object.style.gridColumnGap="50px" Try it

Syntax

grid-column-gap: length;

Value Description
* length * A length value, which can be a number in px or a percentage %. 0 is the default value. Learn moreLength Units.

Related Articles

CSS Tutorial: CSS Grid Layout

CSS Reference Manual: grid-gap property

CSS Reference Manual: grid-row-gap property