Style columnCount property
- Föregående sida color
- Nästa sida columnFill
- Åter till föregående nivå HTML DOM Style-objekt
Definition and Usage
columnCount
Property specifies how many columns the element should be divided into.
See also:
CSS3 Tutorial:CSS-flerspalts
CSS Reference Manual:column-count property
Example
Divide the text in the div element into three columns:
document.getElementById("myDIV").style.columnCount = 3;
Syntax
Return columnCount property:
object.style.columnCount
Set columnCount property:
object.style.columnCount = "number|auto|initial|inherit"
Property value
Value | Description |
---|---|
number | The best number of columns to divide the element content. |
auto | Default value. The number of columns is determined by other properties, such as "column-width". |
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 |
---|---|
Return value: | string indicating the element's column-count property. |
CSS version: | CSS3 |
Browserversioner
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
- Föregående sida color
- Nästa sida columnFill
- Åter till föregående nivå HTML DOM Style-objekt