HTML页脚不在底部,内容超出它。

时间:2016-05-29 12:45:13

标签: html css

我没有在论坛中找到它...所以我的问题是:

我的页面上有一个页脚。这个页脚实际上就在地面上。 但如果我调整页面大小,我必须向下滚动。页脚不再位于底部,内容位于页脚下方。

Can you help me

1 个答案:

答案 0 :(得分:0)

您使用的是position: absolute,但您的页脚需要position: fixed。除此之外,您的content位置不佳,删除了heightbottom属性,并添加了min-heightpadding-bottom属性:

.content {
    background-color: yellow;
    left: 0;
    height: calc(100% - 106px);
    padding-bottom: 50px;
    position: absolute;
    right: 0;
    top: 56px;
    transition: margin-left 0.5s ease 0s;
}