2

When I use nested <table> or nested <tr> , I can't create a column like that . Can anyone help me ????. This picture is exactly what I want .

enter image description here

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701

1 Answers1

2

You need to use the HTML colspan and rowspan attributes.

HTML

<table>
    <tr>
        <td colspan="2"></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td colspan="2"></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
    </tr>
    <tr>
        <td colspan="2"></td>        
     </tr>
</table>

CSS

table {
    width: 100%;
}

td {
    width: 100px;
    height: 50px;
}

DEMO: http://jsfiddle.net/04yjcL2e/1/

For more information about colspan and rowspan see this post:

Community
  • 1
  • 1
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701