Search code examples
htmlhtml-tableinternet-explorer-10

IE10 - tables - alignment not working


Since I upgraded to IE10, tables on my webpage are not shown correctly. Below is the example:

The head section of the table is shown correctly but it seems like the whole body of the table is put in one (left) column or cell.

I searched for the solution, but I didn't find anything useful yet.

Here is the code:

<table class="class" id="id">
<colgroup>
<col width="" style="display:none;"  />
<col width="190" />
<col width="160" />
<col width="100" />
<col width="170" />
<col width="120" />
</colgroup>
<thead>
<tr>
<td></td>
<td>heading1</td>
<td>heading2</td>
<td>heading3</td>
<td>heading4</td>
<td>heading5</td>
</tr>
</thead>
<tbody runat="server" id="tbody">
<tr>
<td style="display: none;">id</td>
<td><div style="float:left; width:15px; height:1.15em; text-align:right; padding-right:8px;"><img src="" alt="" title="" /></div><div style="clear:right; text-align:left; overflow:hidden;" title="">some value</div></td>
<td><div style="overflow: hidden; height:1.15em;" title="">some value</div></td>
<td><div style="overflow: hidden; height:1.15em;">some value</div></td>
<td><div style="overflow: hidden; height:1.15em;">some value</div></td>
<td><div style="overflow: hidden; height:1.15em;">some value</div></td>
</tr>
</tbody>
</table>

Solution

  • Well, your markup shown is a tad invalid, as you're missing the opening <tr> tag in <tbody>. I would say IE10 is actually displaying correctly.