Propriedade de layout da tabela de estilo
Exemplo
Defina um layout de tabela fixo:
document.getElementById("myTable").style.tableLayout = "fixed";
Definição e uso
A propriedade tableLayout define ou retorna a forma de layout de células, linhas e colunas da tabela.
Suporte ao navegador
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Sintaxe
Retorne a propriedade tableLayout:
object.style.tableLayout
Defina a propriedade tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Valores de propriedade
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 |
Detalhes técnicos
Valor padrão: | auto |
---|---|
Valor de retorno: | Uma String, representando o algoritmo de layout de tabela usado para uma tabela |
Versão CSS | CSS2 |
Mais exemplos
Exemplo
Retorne o layout da tabela:
alert(document.getElementById("myTable").style.tableLayout);
Páginas relacionadas
Tutorial CSS: Tabela CSS
Referência CSS: propriedade table-layout
❮ Objeto de estilo