Неправильная интерпретация Internet Explorer 8 colspan? - PullRequest
0 голосов
/ 06 декабря 2010

Эта HTML-таблица неправильно интерпретируется некоторыми браузерами, и я не могу понять, почему:

Chrome и Outlook отображают ожидаемый рендеринг, где 2-я ячейка 2-й и 3-й строкпередать 4-ю ячейку строк с 4 по 10.

Снимок экрана рендеринга Chrome http://www.team -logics.com / public / stackoverflow / 2010-12-05-Chrome.png

Internet Explorer 8 и Opera 10 отображают нечто иное, где 4-я ячейка строк 4–10 «начинается после» 2-й ячейки 2-й и 3-й строк.

Снимок экрана рендеринга Internet Explorer 8 http://www.team -logics.com / public / stackoverflow / 2010-12-05-IE.png

Можно предположить, почему мои colspanset строки не интерпретируются одинаково?Какие браузеры подходят?Как я могу расположить мой код так, чтобы они все отображались как Chrome?

Мой действительный код: (Извините, грязный код, это должна быть подпись электронной почты)

<table border=0 cellspacing=0 cellpadding=0 width=400 style='width:300pt;border-collapse:collapse;border:1px solid black;'>
 <tr style='height:9.75pt'>
  <td colspan=6 valign=top style='border:1px solid black;height:9.75pt;width:300pt;' width="400">
  </td>
 </tr>
 <tr style='mso-yfti-irow:1;height:12pt' height="16">
  <td rowspan=9 valign=top style='border:1px solid black;height:12pt;width:14.25pt' width="19">
  </td>
  <td bgcolor="red" colspan=3 valign=top style='border:1px solid black;height:12pt;width:203.25pt;' width="271">
  </td>
  <td rowspan=2 valign=top style='border:1px solid black;height:12pt;width: 72pt' width="96">
  </td>
  <td rowspan=2 valign=top style='border:1px solid black;height:12pt;width:10.5pt' width="14">
  </td>
 </tr>
 <tr style='mso-yfti-irow:2;height:12pt' height="16">
  <td bgcolor="red" colspan=3 valign=top style='border:1px solid black;height:12pt;width:203.25pt;' width="271" height="16">
  </td>
 </tr>
 <tr style='mso-yfti-irow:3;height:3.75pt' height="5">
  <td colspan=2 valign=top style='border:1px solid black;height:3.75pt;width:170.25pt' width="227" height="5">
  </td>
  <td colspan=3  rowspan=7 valign=top style='border:1px solid black;height:3.75pt;width:115.5pt' width="154">
  </td>
 </tr>
 <tr style='mso-yfti-irow:4;height:11.25pt' height="15">
  <td valign=top style='border:1px solid black;height:11.25pt;width:27.75pt' width="37">
  </td>
  <td valign=top style='border:1px solid black;height:11.25pt;width:142.5pt' width="190">
  </td>
 </tr>
 <tr style='mso-yfti-irow:5;height:11.25ptpt' height="15">
  <td valign=top style='border:1px solid black;height:11.25pt;width:27.75pt' width="37" height="15">
  </td>
  <td valign=top style='border:1px solid black;height:11.25pt;width:142.5pt' width="190" height="15">
  </td>
 </tr>
 <tr style='mso-yfti-irow:6;height:3.75pt' height="5">
  <td colspan=2 valign=top style='border:1px solid black;height:3.75pt;width:170.25pt' width="227">
  </td>
 </tr>
 <tr style='mso-yfti-irow:7;height:11.25pt' height="15">
  <td colspan=2 valign=top style='border:1px solid black;height:11.25pt;width:170.25pt' width="227" height="31" >
  </td>
 </tr>
 <tr style='mso-yfti-irow:8;height:23.25pt' height="31">
  <td colspan=2 valign=top style='border:1px solid black;height:23.25pt;width:170.25pt' width="227">
  </td>
 </tr>
 <tr style='mso-yfti-irow:9;mso-yfti-lastrow:yes;height:50.25pt' height="67">
  <td colspan=2 valign=top style='border:1px solid black;height:50.25pt;width:170.25pt' width="227">
  </td>
 </tr>
</table>

Ответы [ 2 ]

1 голос
/ 10 января 2011

Я не был уверен, где разместить эту проблему, поэтому я разместил ее также в DocType.

Я получил свой ответ там: http://doctype.com/incorrect-internet-explorer-8-colspan-interpretation

Я также должен был указать в моем.

0 голосов
/ 06 декабря 2010

Вероятно, это не поможет, что для многих столбцов у вас есть как ширина CSS (указанная в атрибуте style), так и фактическая ширина.Эти два значения кажутся разными, и я подозреваю, что есть разница в том, как браузеры решают, какой использовать.Попробуйте удалить дубликаты и посмотрите, что произойдет.

...