Estilo tableLayout Propiedad
Ejemplo
Establecer un diseño de mesa fijo:
document.getElementById("myTable").style.tableLayout = "fixed";
Definición y uso
La propiedad tableLayout establece o devuelve la forma de disponer las celdas, filas y columnas de la tabla.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad tableLayout:
object.style.tableLayout
Establezca la propiedad tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
Valores de propiedad
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 |
Detalles técnicos
Valor por defecto: | auto |
---|---|
Valor devuelto: | Una cadena, que representa el algoritmo de diseño de tabla utilizado para una tabla |
Versión CSS | CSS2 |
Más ejemplos
Ejemplo
Devuelve el diseño de la tabla:
alert(document.getElementById("myTable").style.tableLayout);
páginas relacionadas
Tutorial CSS: Tabla CSS
Referencia de CSS: propiedad de diseño de tabla
❮ Objeto de estilo