HTML DOM Style columnWidth property
Examples
Change the width of columns:
document.getElementById("myDIV").style.columnWidth="100px";
try it"
Definition and Usage
columnWidth attribute specifies the width of the column.
Browser Support
Internet Explorer 10 and Opera support columnWidth property.
Firefox supports another alternative of the property attribute that MozColumnWidth property.
Safari and Chrome support another alternative of the property attribute that WebkitColumnWidth property.
grammar
Back columnWidth properties:
object .style.columnWidth
Setting columnWidth properties:
object .style.columnWidth="auto|length|initial|inherit"
Property Value
值 | 描述 |
---|---|
auto | 默认值。列的宽度由浏览器决定。 |
length | 一个规定列宽度的长度。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | auto |
---|---|
return value: | String representing the column-width attribute of the element. |
CSS version | CSS3 |
related articles
CSS3 tutorial: CSS3 multi-column
CSS Reference: column-width attribute