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 .
Asked
Active
Viewed 5,455 times
2

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

Bùi Trần Thanh Đức
- 49
- 1
- 10
1 Answers
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
-
that's not exactly I want but maybe I can use it . Anw , thank you so much – Bùi Trần Thanh Đức Sep 27 '15 at 00:31
-
actually, i'm working on the complete table right now.. will need a few more minutes... you're right, trickier than i thought – Michael Benjamin Sep 27 '15 at 00:32
-
Yup , It's very complex . I have been thinking about it for hours . But I can't do it – Bùi Trần Thanh Đức Sep 27 '15 at 00:34
-
1perfect . Thank you so much – Bùi Trần Thanh Đức Sep 27 '15 at 00:44