THE WORLD'S LARGEST WEB DEVELOPER SITE

Style columnWidth Property

Style Object Reference Style Object

Example

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 Firefox Opera Google Chrome Safari

The columnWidth property is supported in Internet Explorer 10 and Opera.

Firefox supports an alternative, the MozColumnWidth property.

Safari and Chrome support an alternative, 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 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


Style Object Reference Style Object

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: