表页脚自动跨越表的宽度

Vik*_*ram 7 html css html-table

根据我收到的数据,我有一个动态列数的表.我有一个标签需要分散在所有列中,与表中的列数无关.

<table>
<thead>
<tr>
<th><span>ColA</span></th>
<th><span>ColB</span></th>
<th rowspan='2'><span>Col<br/>  C</span></th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td>Footer content here</td>
</tr>
</tfoot>
</table>
Run Code Online (Sandbox Code Playgroud)

编辑colspan = 0为我工作!

<td colspan='0'>Footer content here</td>
Run Code Online (Sandbox Code Playgroud)

适用于FF,虽然不适用于Chrome,IE8 :(

编辑2

colspan ='100%'此链接解决了crossbrowser问题 /sf/answers/351966401/

alb*_*igo 5

使用colspan="0"
顺便说一句,你<tfoot>应该在<thead>和<tbody>标签之间.

编辑:W3C推荐的这种做法不是跨浏览器.小心使用!