html - 在 Internet Explorer 中,Div 没有占据表格单元格的 100% 高度?

标签 html css google-chrome internet-explorer height

HTML

<li class="post">
    <div class="row">
        <div class="col-xs-12 col-sm-6 image">
            <div class="details-hover">
                <a href="#" class="vertical-align">Read more</a>
            </div>
            <div class="image-wrapper">
                <img src="images/3245675.jpg" alt="image" />
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 description">
            <div class="details">
                <div class="date-and-likes">
                    <div class="date">
                        <i class="fa fa-caret-down"></i>
                        <p class="">27 Oct</p>
                    </div>
                    <div class="likes vertical-align">
                        <i class="icon-heart"></i>
                        <p>12</p>
                    </div>
                </div>
                <h3>
                    <a href="#" class="d-text-c">Service &#38; Support on the iPhone 6. reviews and guide</a>
                </h3>
                <div class="author-and-coments">
                    <div class="author">
                        <p>By <a href="#">Admin</a></p>
                    </div>
                    <div class="comments">
                        <i class="icon-bubbles"></i>
                        <p>2 comments</p>
                    </div>
                </div>
            </div>
            <div class="preview">
                <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray...</p>
                <div class="read-more">
                    <i class="fa fa-caret-right"></i>
                    <i class="fa fa-caret-right"></i>
                    <a href="#">Read More</a>
                </div>
            </div>
        </div>
    </div>
</li>

CSS

.post-section .post {
  margin-bottom: 60px;
  display: table;
}
.post-section .post .image,
.post-section .post .description {
  padding: 0;
  float: none;
  display: table-cell;
  vertical-align: top;
}
.post-section .post .description {
  padding-bottom: 60px;
}
.post-section .post .row {
  padding: 0 15px;
}
.post-section .post .image {
  position: relative;
}
.post-section .image-wrapper {
  position: absolute;
  overflow: hidden;
  height: 100%;
  width: 100%;
}
.post-section .post .image img {
  height: 100%;
}
.post-section .post .image .details-hover:hover {
  opacity: 1;
}
.post-section .post .image .details-hover {
  z-index: 33;
  position: absolute;
  text-align: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
}

我需要创建一个帖子列表,左侧是图片,右侧是内容。问题在于 Chrome、Opera 和 Firefox 会根据需要呈现此代码,但 IE 不会。

这是一些图片。

Chrome, Firefox and Opera Internet Explorer

最佳答案

在你的:

<div class="details-hover" style="border: 1px solid blue; border-image:none;"<...</div

您需要在 Internet Explorer 中设置 height: 100%; 的值。

关于html - 在 Internet Explorer 中,Div 没有占据表格单元格的 100% 高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27891107/

相关文章:

python - 从数据库循环 svg 矩形

html - Bootstrap 。使垂直浏览器滚动条在固定导航栏下开始。 (不重叠)

python - 无法在服务器上使用 Chrome 驱动程序运行 selenium 应用程序

html - Chrome 自动保存所有已加载网站的 html

javascript - 无法访问外部 CSSStyleSheet 中的规则

javascript - Slick Slider - 如何保持事件分页(点)始终居中

javascript - 在 JavaScript/jQuery 中获取没有重复的列中的所有值

jquery - 如何在一个页面上使用多个Tabbar

jquery - 如何使图像褪色,滚动时可见并且应该重复 Action

html - 位置 :fixed and margin: auto (margins in general) 之间的冲突