StijltabelLayout - eigenschap
Voorbeeld
Stel een vaste tafelindeling in:
document.getElementById("myTable").style.tableLayout = "fixed";
Definitie en gebruik
De eigenschap tableLayout bepaalt of retourneert de manier waarop tabelcellen, rijen en kolommen worden ingedeeld.
Browserondersteuning
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Syntaxis
Retourneer de eigenschap tableLayout:
object.style.tableLayout
Stel de eigenschap tableLayout in:
object.style.tableLayout = "auto|fixed|initial|inherit"
Eigendomswaarden
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 |
Technische details
Standaardwaarde: | auto |
---|---|
Winstwaarde: | Een tekenreeks, die het tabellay-outalgoritme vertegenwoordigt dat voor een tabel wordt gebruikt |
CSS-versie | CSS2 |
Meer voorbeelden
Voorbeeld
Retourneer de tafelindeling:
alert(document.getElementById("myTable").style.tableLayout);
Gerelateerde pagina's
CSS-zelfstudie: CSS-tabel
CSS-referentie: eigenschap tabellay-out
❮ Stijlobject