Style tableLayout Property
Exemple
Définissez une disposition de table fixe :
document.getElementById("myTable").style.tableLayout = "fixed";
Définition et utilisation
La propriété tableLayout définit ou renvoie la manière de disposer les cellules, les lignes et les colonnes du tableau.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété tableLayout :
object.style.tableLayout
Définissez la propriété tableLayout :
object.style.tableLayout = "auto|fixed|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | auto |
---|---|
Valeur de retour : | Une chaîne, représentant l'algorithme de disposition de table utilisé pour une table |
Version CSS | CSS2 |
Plus d'exemples
Exemple
Renvoie la disposition du tableau :
alert(document.getElementById("myTable").style.tableLayout);
Pages connexes
Tutoriel CSS : Tableau CSS
Référence CSS : propriété table-layout
❮ Objet de style