首页 > 解决方案 > Firefox css 高度 100% 问题。怎么修?

问题描述

我有一张桌子,里面有 div 的 tds。Div 应该适合所有 td 的高度。

tds有height: 1px; tds 中的 div 有height: 100%;

这是页面的链接http://websitebuilder.su/workfox/index.php

但在 Firefox 中,这个技巧不起作用。我怎样才能让它无处不在?

镀铬版

火狐版

标签: htmlcssfirefox

解决方案


如果您将图像的样式更改为:

section.main_stages table td > div > div > img {
    /* margin-top: 15px; */
    /* margin-left: 8px; */
    position: absolute;
    top: 15px;
    left: 8px;
}

将封闭的 div 向左浮动并给它一个相对位置:

section.main_stages table td > div > div {
    width: calc(100% - 42px - 4px );
    float: left;
    padding-bottom: 24px;
    position: relative;
}

并摆脱 100% 的高度:

section.main_stages table td > div {
    width: auto;
    /* height: 100%; */
}

这似乎可以在 FireFox 中修复它。


推荐阅读