Skip to content

Instantly share code, notes, and snippets.

@keating
Created September 25, 2012 01:49
Show Gist options
  • Select an option

  • Save keating/3779521 to your computer and use it in GitHub Desktop.

Select an option

Save keating/3779521 to your computer and use it in GitHub Desktop.
IE9下colspan不起作用的解决办法:在最前面加一个tr,其中添加colspan数量的td
<style type="text/css">
td {
border: 1px solid #ccc;
height: 24px;
padding: 2px;
vertical-align: top;
}
.ie9-bug-tr td {
height: 0px;
border: none;
}
</style>
<table id="report-table" width="98%" border="1" cellspacing="0" cellpadding="0" style="table-layout: fixed;border-collapse: collapse;">
<tr class="ie9-bug-tr">
<td style="width: 100px;"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="1">
XXX
</td>
<td colspan="4">
</td>
<td colspan="8">
</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment