Properti tata letak tabel gaya
Contoh
Mengatur tata letak tabel tetap:
document.getElementById("myTable").style.tableLayout = "fixed";
Definisi dan Penggunaan
Properti tableLayout menyetel atau mengembalikan cara menata sel tabel, baris, dan kolom.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti tableLayout:
object.style.tableLayout
Setel properti tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Nilai properti
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 |
Detail Teknis
Nilai Bawaan: | mobil |
---|---|
Nilai Kembali: | Sebuah String, mewakili algoritma tata letak tabel yang digunakan untuk sebuah tabel |
Versi CSS | CSS2 |
Lebih Banyak Contoh
Contoh
Kembalikan tata letak tabel:
alert(document.getElementById("myTable").style.tableLayout);
Halaman Terkait
Tutorial CSS: Tabel CSS
Referensi CSS: properti tata letak tabel
Objek Gaya