Styl tableLayout Property
Příklad
Nastavte pevné rozložení tabulky:
document.getElementById("myTable").style.tableLayout = "fixed";
Definice a použití
Vlastnost tableLayout nastavuje nebo vrací způsob rozložení buněk, řádků a sloupců tabulky.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost tableLayout:
object.style.tableLayout
Nastavte vlastnost tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | auto |
---|---|
Návratová hodnota: | Řetězec představující algoritmus rozvržení tabulky použitý pro tabulku |
Verze CSS | CSS2 |
Další příklady
Příklad
Vrátit rozložení tabulky:
alert(document.getElementById("myTable").style.tableLayout);
Související stránky
CSS tutoriál: CSS tabulka
CSS reference: vlastnost rozvržení tabulky
❮ Objekt stylu