Style columns Property
- Previous Page columnRuleWidth
- Next Page columnSpan
- Go Up One Level HTML DOM Style Object
Definition and Usage
columns
The property is a shorthand property for setting columnWidth and columnCount.
See Also:
CSS3 Tutorial:CSS Multi-column
CSS Reference Manual:columns Property
Example
Split the text into three columns, each with at least 100 pixels:
document.getElementById("myDIV").style.columns = "100px 3";
Syntax
Return columns Property:
object.style.columns
Set columns Property:
object.style.columns = "auto|column-width column-count|initial|inherit"
Property Value
Value | Description |
---|---|
auto | Default Value. Set the column width to "auto", and the number of columns to "auto". |
columnWidth | Column Width. |
columnCount | Number of Columns. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default Value: | auto auto |
---|---|
Return Value: | String, representing the element's columns Property. |
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 columnRuleWidth
- Next Page columnSpan
- Go Up One Level HTML DOM Style Object