HTML - IE10无法正确显示表格?

时间:2014-01-06 18:25:59

标签: html css internet-explorer

这是我的HTML:

      <table id='first' width="800" border="0" cellpadding="0"> <!-- first table -->
        <tr>
          <td width="323">
                  <img src="../imageOne.jpg" width="323" height="179" alt="" />
          </td>

          <td width="257">
              <table id='second'> <!-- table inside table -->
                  <tr>
                      <td><img src="../imageTwo.jpg" alt="CSS logo" width="190" height="100" /></td>
                  </tr>
                  <tr>
                     <td><br /><img src="../imageThree.jpg" alt="ESA logo" width="190" height="95" /></td>
                  </tr>
              </table> <!-- end second table. This second table had two rows / two images, one on top of another. -->
         </td>
          <td width="212"><img src="../imageFour.jpg" width="203" height="251" alt="photo of an extension cord plugged in" /></td>
    </tr>
  </table>

这实际上不是我的HTML,我在工作,必须编辑别人。 如您所见,表格中有一个表格。在IE8中,第二个表位于第一个表中,但由于某些原因,在IE10中,第二个表位于第一个表下方。好像第二个表有一个

margin-top: 20px;

但我确保该表没有margin-top。知道为什么第二个表不是内联/完全在第一个表内吗? 注意:此网页位于Intranet站点上。

编辑:我在想,如果我能找到一种方法来垂直对齐第一个表内的表,那么这可能会解决问题吗?有没有办法在另一个表中垂直对齐一个表?

1 个答案:

答案 0 :(得分:2)

您几乎肯定遇到兼容模式问题:

点击工具 - &gt;兼容性查看设置

取消“在兼容性视图中显示Intranet站点”

出于我想象的原因,Microsoft认为默认情况下Intranet站点应该以“兼容性视图”模式呈现,这基本上意味着IE的渲染引擎的早期版本(我相信它会一直回到IE7)。 / p>

http://windows.microsoft.com/en-CA/internet-explorer/use-compatibility-view#ie=ie-11

您可能还想查看此元标记以及您需要在web.config中设置的标题,详见SO帖子:

<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

X-UA-Compatible is set to IE=edge, but it still doesn't stop Compatibility Mode

相关问题