CSS3 column-gap property
Example
Specify the gap between columns as 40 pixels:
div
{
column-gap:
40
px
;
}
Try it »
There are more examples at the bottom of this page.
Browser support
| property | |||||
|---|---|---|---|---|---|
| column-gap | 50.0 | ||||
| 4.0 -webkit- | 10.0 | 2.0 -moz- | 9.0 | ||
| 3.1 -webkit- | 37.0 |
15.0 -webkit
11.1 |
Property definition and usage
The column-gap property specifies the gap between columns.
Note: If a distance rule between columns is specified, it is taken as the average.
| Default value: | normal |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.columnGap="40px" |
Syntax
column-gap:
length
|normal;
| Value | Description |
|---|---|
| length | A specified length that sets the gap between columns |
| normal | Specifies a normal gap between columns. W3C recommends a value of 1em |
More examples
Column-count
Divide the text of a div element into three columns.
Column-rule
Specify the rule between columns: width, style, and color.
Related Articles
CSS Tutorial: CSS Multiple Columns
CSS Tutorial: CSS Grid Layout
CSS Reference Manual: row-gap property
CSS Reference Manual: gap property
HTML DOM Reference Manual: columnGap property