Search w3schools.com:

SHARE THIS PAGE

CSS Reference

CSS Reference CSS Selectors CSS Reference Aural CSS Web Safe Fonts CSS Units CSS Colors CSS Color Values CSS Color Names CSS Color HEX CSS3 Browser Support

CSS Properties

CSS3 column-gap Property


Example

Specify a 40 pixels gap between the columns:

div
{
column-gap:40px;
-moz-column-gap:40px; /* Firefox */
-webkit-column-gap:40px; /* Safari and Chrome */
}

Try it yourself »
More examples at the bottom of this page.

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The column-gap property is supported in Internet Explorer 10 and Opera.

Firefox supports an alternative, the -moz-column-gap property.

Safari and Chrome support an alternative, the -webkit-column-gap property.

Note: The column-gap property is not supported in Internet Explorer 9 and earlier versions.  


Definition and Usage

The column-gap property specifies the gap between the columns.

Note: If there is a column-rule between columns, it will appear in the middle of the gap.

Default value: normal
Inherited: no
Version: CSS3
JavaScript syntax: object.style.columnGap="40px"


Syntax

column-gap: length|normal;

Value Description Play it
length A specified length that will set the gap between the columns Play it »
normal Specifies a normal gap between the columns. W3C suggests a value of 1em Play it »


Examples

Try it Yourself - Examples

Column-count
Divide the text in a div element into three columns.

Column-rule
Specify the width, style and color of the rule between columns.


Related Pages

CSS3 tutorial: CSS3 Multiple Columns



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]