tabla inmovilizar filas fijar encabezado columnas html css datatables jquery-datatables

inmovilizar - fijar encabezado tabla html



DataTable: ¿Cómo ocultar el encabezado de la tabla? (3)

Por favor vea el siguiente código como un ejemplo:

.inventory_related thead { display: none; }

<table> <thead> <th>header 1</th> <th>header 2</th> </thead> <tbody> <td>row value 1</td> <td>row value 2</td> </tbody> </table> <table class=''inventory_related''> <thead> <th>header</th> <th>header 2</th> </thead> <tbody> <td>row value 3</td> <td>row value 4</td> </tbody> </table>

Tengo 2 tablas usando DataTable:

  • arriba: coincidencia exacta
  • abajo: relacionado

Así es como se ven ahora.

Como puede ver, no es necesario mostrar el encabezado de la tabla en la segunda tabla. Quiero esconderlo

He intentado usar esto en mi CSS:

Dado que la clase = inventory_related

.inventory_related table thead { display:none; }

También traté de quitar todo:

<thead class="thin-border-bottom "> <th>Catalog # </th> <th>Description</th> <th>Available Vials</th> </thead>

Esto tampoco funciona.

¿Alguien tiene alguna sugerencia sobre cómo ocultar mi segundo encabezado de tabla?

Gracias.


si la clase de <table> está inventory_related , escriba el siguiente css

.inventory_related thead { display:none; }


<table> <thead style=''display:none;''> <th>header 1</th> <th>header 2</th> </thead> <tbody> <td>row value 1</td> <td>row value 2</td> </tbody> </table>