Style columnWidthProperty
Examples
Change the width of the columns:
document.getElementById("myDIV").style.columnWidth="100px";
Try it Yourself »
Definition and Usage
The columnWidth property specifies the width of the columns.
Browser Support
![]()
Internet Explorer 10 and Opera support the columnWidth property.
Firefox supports an alternative property, namely the MozColumnWidth property.
Safari and Chrome support an alternative property, namely the WebkitColumnWidth property.
Syntax
Return the columnWidth property:
object.style.columnWidth
Set the columnWidth property:
object.style.columnWidth="auto|length|initial|inherit"
Property Values
| Value | Description |
|---|---|
| auto | Default value. The column width is determined by the browser. |
| length | A length specifying the column width. |
| initial | Sets this property to its default value. Seeinitial。 |
| inherit | Inherits this property from its parent element. Seeinherit。 |
Technical Details
| Default Value: | auto |
|---|---|
| Return Value: | A string representing the column-width property of an element. |
| CSS Version | CSS3 |
Related Articles
CSS3 Tutorial:CSS3 Multiple Columns
CSS Reference Manual:column-width property
Other Extensions
Style Object