Thuộc tính bảng kiểu Bố cục
Ví dụ
Đặt bố cục bảng cố định:
document.getElementById("myTable").style.tableLayout = "fixed";
Hãy tự mình thử »Sự miêu tả
Thuộc tính tableLayout đặt hoặc trả về cách bố trí các ô, hàng và cột của bảng.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Cú pháp
Trả về thuộc tính tableLayout:
object .style.tableLayout
Đặt thuộc tính tableLayout:
object .style.tableLayout = "auto|fixed|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
auto | Column width is set by the widest unbreakable content. This is default.
|
fixed | Column width is set by the width of table and columns (not the content of the cells)
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Chi tiết kỹ thuật
Giá trị mặc định: | tự động |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuật toán bố trí bảng được sử dụng cho một bảng |
Phiên bản CSS | CSS2 |
Thêm ví dụ
Ví dụ
Trả về bố cục bảng:
alert(document.getElementById("myTable").style.tableLayout);
Hãy tự mình thử »Trang liên quan
Hướng dẫn CSS: Bảng CSS
Tham chiếu CSS: thuộc tính bố cục bảng