【发布时间】:2013-02-05 00:56:20
【问题描述】:
我正面临 html Table 元素单元格宽度的问题。 IE8 和 IE9 中表格单元格的宽度不一样。请在下面的代码 sn-p 中找到我使用 table colgroup 将表格单元格的宽度和表格的宽度设置为 100%。
[HTML]
<table id="Grid1_Table" class="Table">
<colgroup>
<col style="width:20px">
<col style="width:20px">
<col style="width:180px">
<col style="width:200px">
</colgroup>
<tbody>
<tr>
<td class="RowHeader"><div> </div></td>
<td class="RecordPlusCollapse" ><div> </div></td>
<td colspan="2" class="GroupCaption">Order ID: 0 - 1 Items</td>
</tr>
</tbody>
[CSS]
.RowHeader
{
background-color : black;
}
.GroupCaption
{
background-color : #868981;
}
.RecordPlusCollapse
{
background-color : red;
}
.Table
{
width:100%;
}
请参考下面的提琴手文件来检查 IE8 和 IE9 的问题。
你能检查一下吗?
【问题讨论】:
-
您是否使用了 CSS 重置?有时这会解决这样的跨浏览器问题。
标签: html css internet-explorer html-table