Firefox CSS高度100%问题。怎么修?

时间:2019-07-14 03:31:33

标签: html css firefox

我在tds中有一个带有div的表。 div应该适合所有td的高度。

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

这是指向页面http://websitebuilder.su/workfox/index.php

的链接

但是在Firefox中,此技巧不起作用。我如何使它在任何地方都能正常工作?

chrome version

firefox version

1 个答案:

答案 0 :(得分:0)

如果将图像样式更改为:

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中修复。