Reputation: 23
I cannot get this table to accept rowspan for some reason.
I haven't tried much.
<table style="border: 3px solid black; width:95%">
<caption>This is a caption, looks a lot like a
title</caption>
<colspan>
<col style="background-color:aquamarine">
<col style="background-color:crimson">
<col style="background-color:aquamarine">
</colspan>
<thead>
<tr>
<th colspan="2">This is a colspan.</th>
<th rowspan="3">rowspan</th>
</tr>
</thead>
<tbody>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Test3</td>
<td>Test4</td>
</tr>
</tfoot>
</table>
I want rowspan="3" to work correctly.
Upvotes: 2
Views: 100
Reputation: 199
If I understood the question correctly, you want to have rowspan for rows including header.
<table style="border: 3px solid black; width:95%">
<caption>This is a caption, looks a lot like a
title</caption>
<colspan>
<col style="background-color:aquamarine">
<col style="background-color:crimson">
<col style="background-color:aquamarine">
</colspan>
<tbody>
<tr>
<th colspan="2">This is a colspan.</th>
<th rowspan="3">rowspan</th>
</tr>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
<tr>
<td>Test3</td>
<td>Test4</td>
</tr>
</tbody>
</table>
Is it what you are expecting ?
Upvotes: 1