CSS grid-column-gap attribute


Set the grid spacing between columns to 50px:

.grid-container { display: grid ; grid-column-gap: 50 px ; }

Give it a try »

Browser support

The number in the table indicates the first browser version number that supports this attribute .

grid-column-gap 57 16 52 10 44

Attribute definition and instructions

grid-column-gap Property defines the grid spacing between columns .

be careful : The property is in CSS3 Rename to column-gap .

Default value : 0
inherit : no
Animation : support . Read about animatable Give it a try
edition : CSS Grid layout module Level 1
JavaScript Grammar : object.style.gridColumnGap="50px" Give it a try


grid-column-gap: length;

Worth Describe
length Length value , It can be px A number or percentage in %. 0 Is the default . Learn more Length unit .

Related articles

CSS course : CSS Grid layout

CSS Reference manual : grid-gap attribute

CSS Reference manual : grid-row-gap attribute