Style columnGap attribute
- Previous Page columnFill
- Next Page columnRule
- Go Up One Level HTML DOM Style Object
Definition and Usage
columnGap
This attribute specifies the gap between columns.
Note:If a column-rule is set between columns, it will be displayed in the middle of the gap.
See also:
CSS3 Tutorial:CSS Multi-column
CSS Reference Manual:column-gap attribute
Example
Specify the gap between columns as 40 pixels:
document.getElementById("myDIV").style.columnGap = "50px";
Syntax
Return columnGap attribute:
object.style.columnGap
Set columnGap attribute:
object.style.columnGap = "length|normal|initial|inherit"
Attribute Value
Value | Description |
---|---|
length | Set the gap between columns to a specified length. |
normal | Default value. Specifies the gap between columns as the normal gap. The recommended value by W3C is 1em. |
initial | Set this attribute to its default value. See also initial. |
inherit | This attribute inherits from its parent element. See also inherit. |
Technical Details
Default value: | normal |
---|---|
Return value: | A string that represents the column-gap attribute. |
CSS Version: | CSS3 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
- Previous Page columnFill
- Next Page columnRule
- Go Up One Level HTML DOM Style Object