Właściwość układu tabeli stylów
Przykład
Ustaw stały układ tabeli:
document.getElementById("myTable").style.tableLayout = "fixed";
Definicja i użycie
Właściwość tableLayout ustawia lub zwraca sposób układania komórek, wierszy i kolumn tabeli.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość tableLayout:
object.style.tableLayout
Ustaw właściwość tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | automatyczny |
---|---|
Wartość zwrotu: | String, reprezentujący algorytm układu tabeli używany dla tabeli |
Wersja CSS | CSS2 |
Więcej przykładów
Przykład
Zwróć układ tabeli:
alert(document.getElementById("myTable").style.tableLayout);
Powiązane strony
Samouczek CSS: Tabela CSS
Odniesienie CSS: właściwość układu tabeli
❮ Obiekt stylu