Style columnWidth Property
Example
Change the width of the columns:
document.getElementById("myDIV").style.columnWidth = "100px";
Try it Yourself »
Description
The columnWidth property specifies the width of the columns.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| columnWidth | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
Syntax
Return the columnWidth property:
object.style.columnWidth
Set the columnWidth property:
object.style.columnWidth = "auto|length|initial|inherit"
Property Values
| Value | Description |
|---|---|
| auto | Deafult value. The column width will be determined by the browser |
| length | A length that specifies the width of the columns |
| initial | Sets this property to its default value. Read about initial |
| inherit | Inherits this property from its parent element. Read about inherit |
Technical Details
| Default Value: | auto |
|---|---|
| Return Value: | A String, representing the column-width property of an element |
| CSS Version | CSS3 |
Related Pages
CSS3 tutorial: CSS3 Multiple Columns
CSS reference: column-width property