Consider the following scenario:
In this scenario, the calculations for cell width fail and may cause incorrect cell spanning.
In the following example, the table cells should share the table size as 50 percent each. However, in this scenario, the table cells do not span the cell width as 50 percent each.
Note In Internet Explorer 10, cell calculation works for Internet Explorer 5 quirks mode and in Internet Explorer 7 document mode. However, cell calculation fails in other document modes.
- A webpage has a table that contains four columns of 25 percent width.
- The table also contains one row with two cells, and each cell spans two columns.
- The table has fixed table layout as defined by COL tags to specify the correct column widths.
- The content of the table has cells that define the spanning width.
In this scenario, the calculations for cell width fail and may cause incorrect cell spanning.
In the following example, the table cells should share the table size as 50 percent each. However, in this scenario, the table cells do not span the cell width as 50 percent each.
<table class="blueBorder borderBox" style="table-layout: fixed; width: 200px" cellspacing="0" cellpadding="0" border="0" >
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
</colgroup>
<tbody>
<tr>
<td colspan="2" class="redBorder">colspan=2</td>
<td colspan="2" class="redBorder">colspan=2</td>
</tr>
</tbody>
</table>
Note In Internet Explorer 10, cell calculation works for Internet Explorer 5 quirks mode and in Internet Explorer 7 document mode. However, cell calculation fails in other document modes.