div在显示内部的定位:IE 10中的table-cell

时间:2013-07-25 03:16:39

标签: internet-explorer vertical-alignment css-tables

试图理解为什么IE9-10会对IE7,8,FF,WK按预期呈现的东西感到窒息。

是否有任何技巧让IE 9-10正确地尊重'表格单元'的固有高度。 (重要说明:由于各种原因,我无法使用高度:'cell'db上100%。)

http://jsfiddle.net/swortis/fCn8Y/

HTML:

<div class="table">
  <div class="row">
    <div class="cell">
      <div class="wrapper">
        <div class="content"></div>
      </div>
    </div>
  </div>
</div>

CSS:

    <style>

      html,
      body {
        height: 100%;
        margin: 0;
      }

     .table {
       display:table;
       height: 100%;
       width: 200px;
     }

    .row {
      display: table-row;
      }

    .cell {
      display: table-cell;
      vertical-align:top;
      }

    .wrapper {
      display:table;
      position: relative;
      height: 100%;
      width: 100%;
      }

   .content {
      position: absolute;
      background: red;
      width: 100%;
      height: 100%;
    }

  </style>

0 个答案:

没有答案
相关问题