复杂的粘性页脚和100%的内容高度

时间:2013-04-05 02:49:44

标签: css layout position sticky-footer

我正在尝试将内容div拉伸到100%高度:

http://new.art-frame.spb.ru/catalog

内容DIV:

<div id="rt-transition">...</div>

页脚:

<footer id="rt-footer-surround">...</footer>

问题是,我无法改变html布局,只能改变CSS。

(最好的方法是使用Firebug / Chrome检查器查看所有内容)

html {
    position: relative;
    min-height: 100%;
    height: auto;
    margin: 0;
}

body {
    margin: 0 0 100px;
    min-width: 100px !important;
}

footer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 100px;
    width: 100%;
}

2 个答案:

答案 0 :(得分:0)

尝试将height的{​​{1}}更改为html而不是100%。然后,使用内部所有元素的CSS来使其适合。如果有多余的溢出,请使用

auto

要解决此问题,虽然这不允许滚动。

答案 1 :(得分:0)

集:

min-height: 720px;

在你的rt-main上

相关问题