2

Is there a way to do this type of table using HTML / CSS?

Header1 | Header2 | Header 3
--------+---------+----------
0       | 1  asdasdasdasd 7
2       | 5  asdasdasdasd 3
9       | 7  asdasdasdasd 2
Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126

2 Answers2

2

If you have <table> markup then <td colspan=2> will help you. If you want this with <div>s and so with pure CSS then you will need so called grid systems

c-smile
  • 25,702
  • 7
  • 55
  • 82
2

By using colspan you can make cells span multiple columns.

<table>
    <tr>
        <th>Header 1</th>
        <th>Header 2</th>
        <th>Header 3</th>
    </tr>
    <tr>
        <td>0</td>
        <td colspan="2">1 asdasdasdasd 7</td>
    </tr>
    <tr>
        <td>2</td>
        <td colspan="2">5 asdasdasdasd 3</td>
    </tr>
    <tr>
        <td>9</td>
        <td colspan="2">7 asdasdasdasd 2</td>
    </tr>
</table>
GoMega54
  • 146
  • 2
  • 8
  • 1
    Forgive the edit, but a `row` can always span multiple columns; it's the `` element that needs to span multiple columns with the `colspan` attribute. :) – David Thomas Jul 04 '16 at 16:25