W3cubDocs

/CSS

column-gap

The column-gap CSS property sets the size of the gap (spacing) between an element's columns.

/* Keyword value */
column-gap: normal; 

/* <length> values */
column-gap: 3px;
column-gap: 2.5em;

/* <percentage> value */
column-gap: 3%;

/* Global values */
column-gap: inherit;
column-gap: initial;
column-gap: unset;

Syntax

The column-gap property is specified as one of the values listed below.

Values

normal
The browser's default spacing is used between columns. The specification, which most modern browsers follow, recommends that this be equal to a length of 1em.
<length>
The size of the gap between columns, defined as a <length>. It must non-negative.
<percentage>
The size of the gap between columns, defined as a <percentage>. It must non-negative.

Formal syntax

<length-percentage> | normal

where
<length-percentage> = <length> | <percentage>

Example

HTML

<p class="content-box">
  This is some multi-column text with a 40px column
  gap created with the CSS `column-gap` property.
  Don't you think that's fun and exciting? I sure do!
</p>

CSS

.content-box {
  column-count: 3;
  column-gap: 40px;
}

Result

Specifications

Specification Status Comment
CSS Multi-column Layout Module
The definition of 'column-gap' in that specification.
Candidate Recommendation Initial definition.
Initial value normal
Applies to multicol elements
Inherited no
Percentages refer to the content width of the multi-column element
Media visual
Computed value as specified with lengths made absolute
Animation type a length, percentage or calc();
Canonical order per grammar

Browser compatibility

Feature Chrome Edge Firefox Internet Explorer Opera Safari
Basic support

50

Yes -webkit-

Yes

Yes -webkit-

52

1.5 -moz- 1

10

11.1

15 -webkit-

3 -webkit-
Feature Android webview Chrome for Android Edge mobile Firefox for Android Opera Android iOS Safari Samsung Internet
Basic support Yes 50

Yes

Yes -webkit-

52

4 -moz-

? ? ?

1. Before Firefox 3, the default value for the normal keyword was 0 and not 1em.

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap