column-gap property

Tutorials

Definition and Usage

The column-gap CSS property sets the size of the gap between columns for elements which are specified to display as a multi-column element.

  • Initialnormal
  • Applies tomulticol elements
  • Inheritedno
  • Mediavisual
  • Computed Valuethe absolute length or the keyword normal
  • Animatableyes, as a length
  • Canonical orderthe unique non-ambiguous order defined by the formal grammar

Syntax

Formal syntax: <length> | normal
column-gap: 3px
column-gap: 2.5em
column-gap: normal
column-gap: inherit

Values

normal
Is a keyword indicating to use the browser-defined default spacing between columns. The specification, and most modern browsers follow it, recommends this keyword to be equal to a length of 1em.
<length>
Is a <length> value defining the size of the gap between columns. It must not be negative, but may be equal to 0.

Examples

1 .content-box {
2   border10px solid #000000;
3   column-count: 3;
4   column-gap: 20px;
5 }

Compatibility

Desktop browsers

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes)-webkit 1.5 (1.8)-moz 10 11.1 3.0 (522)-webkit

Mobile browsers

Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support NA (Yes) NA NA NA

Rate article