2011年2月25日 星期五

表格的colspan在firefox顯示不出來怎麼辦?

參考資料:http://thedesignspace.net/MT2archives/000376.html

<table border=1>
<tr style="display:block">
<th colspan="3">
Using display:block on this table. This th should span 3 columns
</th>
</tr>
<tr> 
<td>cell 1</td>
<td>cell 2</td>
<td>cell 3</td>
</tr>
</table>
<table border=1>
<tr style="display:table-row">
<th colspan="3">
Using display:table-row on this table. This th should span 3 columns
</th>
</tr>
<tr> 
<td>cell 1</td>
<td>cell 2 </td>
<td>cell 3</td>
</tr>
</table>
把display:block改用display:table-row,就ok啦!


沒有留言: