Styl tafeluitleg- eiendom
Voorbeeld
Stel 'n vaste tabeluitleg:
document.getElementById("myTable").style.tableLayout = "fixed";
Definisie en gebruik
Die tableLayout-eienskap stel of gee terug die manier om tabelselle, rye en kolomme uit te lê.
Blaaierondersteuning
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Gee die tableLayout-eienskap terug:
object.style.tableLayout
Stel die tableLayout-eienskap:
object.style.tableLayout = "auto|fixed|initial|inherit"
Eiendomswaardes
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 |
Tegniese besonderhede
Standaard waarde: | outo |
---|---|
Terugkeerwaarde: | 'n String, wat die tabeluitlegalgoritme verteenwoordig wat vir 'n tabel gebruik word |
CSS weergawe | CSS2 |
Meer voorbeelde
Voorbeeld
Gee die tabeluitleg terug:
alert(document.getElementById("myTable").style.tableLayout);
Verwante bladsye
CSS-tutoriaal: CSS-tabel
CSS verwysing: tabel-uitleg eiendom
❮ Stylvoorwerp