How to combine these cells in html?

1

I have the following table:

<div class="card data-table nueva-table">
            <table>
                <thead>
                    <tr>
                        <th class="nuevo-td" style="font-size: 11px;">Nombre</thd>
                        <th class="nuevo-td" style="font-size: 11px;">Individual</th>
                        <td class="label-cell nuevo-th" style="font-size: 11px;">Red</th>
                        <th class="label-cell nuevo-th" style="font-size: 11px;">Titulo</th>
                    </tr>
                </thead>
                <tbody id="listado_volumen_negocio" class="listado_volumen_negocio">
                </tbody>
            </table>
        </div>

Visually it looks like this:

But in the Individual and network cells it should look like this:

Thank you very much in advance.

    
asked by JG_GJ 26.11.2018 в 20:21
source

3 answers

2

What you want to know is how to use rowspan and colspan of html, I leave you a simple example:

<table border='1'>
  <tr>
    <td rowspan='2'>
      rowspan 2
    </td>
    <td colspan='2'>
      colspan 2
    </td>
    <td rowspan='2'>
      rowspan 2
    </td>
  </tr>
  <tr>
    <td>celda normal</td>
    <td>celda normal</td>
  </tr>
</table>

I hope that the small example will serve you.

    
answered by 26.11.2018 / 21:56
source
0

Colspan

<div class="card data-table nueva-table">
<table>
    <thead>
        <tr>
            <th></th>
            <th colspan="2" style="font-size: 11px;">Volumen de Negocio</th>
            <th></th>
        </tr>
        <tr>
            <th class="nuevo-td" style="font-size: 11px;">Nombre</th>
            <th class="nuevo-td" style="font-size: 11px;">Individual</th>
            <td class="label-cell nuevo-th" style="font-size: 11px;">Red</th>
            <th class="label-cell nuevo-th" style="font-size: 11px;">Titulo</th>
        </tr>
    </thead>
    <tbody id="listado_volumen_negocio" class="listado_volumen_negocio">
    </tbody>
</table>

    
answered by 26.11.2018 в 20:33
0

The property that you should use in the row and upper cell is "colspan" and indicate the number of columns you will join.

<table border=1>
    <thead>
        <tr>
            <th colspan="2">a</th>
        </tr>
        <tr>
            <th>a</th>
            <th>a</th>
        </tr>
    </thead>
</table>
    
answered by 26.11.2018 в 20:27