Stile tableLayout Proprietà
Esempio
Imposta un layout fisso del tavolo:
document.getElementById("myTable").style.tableLayout = "fixed";
Definizione e utilizzo
La proprietà tableLayout imposta o restituisce il modo per disporre le celle, le righe e le colonne della tabella.
Supporto browser
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Sintassi
Restituisce la proprietà tableLayout:
object.style.tableLayout
Imposta la proprietà tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Valori di proprietà
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 |
Dettagli tecnici
Valore di default: | auto |
---|---|
Valore di ritorno: | Una stringa, che rappresenta l'algoritmo di layout della tabella utilizzato per una tabella |
Versione CSS | CSS2 |
Altri esempi
Esempio
Restituisci il layout della tabella:
alert(document.getElementById("myTable").style.tableLayout);
Pagine correlate
Tutorial CSS: Tabella CSS
Riferimento CSS: proprietà table-layout
❮ Oggetto stile