1

Is it possible to make each row/column in a table have it's own Unique height, that way if I wanted a table that looks like this, I could:

+-----------------------------+
|  Data  |   Data    |  Data  |
|  Data  +-----------+  Data  |
|  Data  |   Data    |  Data  |
+--------+-----------+--------+

Sorry if this is not descriptive enough, as I don't know any other way to explain it. The goal is for this to be a single <table> that doesn't have the entire row's height effected by a single column. Each columns height is independent of the row.

Hobbyist
  • 15,888
  • 9
  • 46
  • 98

2 Answers2

2

You can achieve this layout by using the rowspan attribute

<table>
    <tr>
        <td rowspan="2">Data<br>Data<br>Data</td>  
        <td>Data</td>
        <td>Data</td>
        <td rowspan="2">Data<br>Data<br>Data</td>  
    </tr>
    <tr>
        <td>Data</td>
        <td>Data</td>
    </tr>
</table>
Sergio Vilchis
  • 332
  • 2
  • 4
  • 16
1

Use the rowspan attribute of the <td> element:

<table>
    <tr>
        <td rowspan="2">Data<br>
                        Data<br>
                        Data</td>
   </tr>
   <tr>
       <td>Data</td>
       <td>Data</td>
   </tr>
   <tr>
       <td rowspan="2">Data<br>
                       Data<br>
                       Data</td>
   </tr>
</table>

Here is a sample JSFiddle.

Sumner Evans
  • 8,951
  • 5
  • 30
  • 47