Style columns property
- Forrige side columnRuleWidth
- Næste side columnSpan
- Gå tilbage til forrige niveau HTML DOM Style Object
Definition and usage
columns
This property is a shorthand property for setting columnWidth and columnCount.
See also:
CSS3 Tutorial:CSS flere kolonner
CSS Reference Manual:columns property
Example
Split text into three columns, each at least 100 pixels wide:
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 column width to "auto", and column count 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 that represents 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 |
- Forrige side columnRuleWidth
- Næste side columnSpan
- Gå tilbage til forrige niveau HTML DOM Style Object