CSS ความกว้างคอลัมน์

Definition and Usage

The column-width property specifies the width of the column.

See also:

CSS3 Tutorial:CSS3 หลายคอลัมน์

HTML DOM Reference Manual:columnWidth Property

Example

Specify the width of the column:

div
{
column-width:100px;
}

Try it yourself

More examples at the bottom of the page.

CSS Syntax

column-width: auto|length;

Attribute Value

Value Description Test
auto The column width is determined by the browser Test
length Specify the width of the column Test

Technical Details

Default Value: auto
Inheritance: no
Version: CSS3
JavaScript Syntax: object.style.columnWidth="100px"

ตัวอย่างเพิ่มเติม

Column-count
แบ่งข้อความของ element div ในสามคอลัมน์
Column-gap
แบ่งข้อความของ element div ในสามคอลัมน์ และมีช่องว่างระหว่างคอลัมน์ 30 pixel
Column-rule
กำหนดความกว้าง รูปแบบ และสีของช่องตาราง

การสนับสนุนโดยบราวเซอร์

ตัวเลขในตารางระบุเวอร์ชั่นบราวเซอร์แรกที่สนับสนุนคุณสมบัตินี้อย่างเต็มที่

ตัวเลขที่มี -webkit- หรือ -moz- หมายถึงการใช้ตัวเลือกแรกของเครื่องหมายหน้าในฐานะเดิม

Chrome IE / Edge Firefox Safari Opera
50.0 10.0 52.0 10.0 37.0