Style columns property
- Vorherige Seite columnRuleWidth
- Nächste Seite columnSpan
- Zurück zur vorherigen Ebene HTML DOM Style-Objekt
Definition and Usage
columns
The property is a shorthand property for setting columnWidth and columnCount.
See also:
CSS3 Tutorial:CSS-Mehrfachspalten
CSS Reference Manual:columns property
Example
Split the 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 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 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 |
- Vorherige Seite columnRuleWidth
- Nächste Seite columnSpan
- Zurück zur vorherigen Ebene HTML DOM Style-Objekt