html - 页脚不在页面底部

标签 html css

我让页脚留在页面底部 here ,但我做了一些事情,不知道是什么,现在在内容下面。我试过更改包装器的最小高度值,但它没有做任何事情。

页脚代码:

<div id='footer'>&copy; Copyright 2013 Austen Patterson. All Rights Reserved.</div>

</body>
</html>

页脚样式:

#footer {
margin-right: 10%;
min-width: 100%;
color: #4bb3e6;
text-align: right;
}

主体/包装样式:

body {
    background:url("http://pattersoncode.ca/incls/pw_pattern.png");
    color: black;
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Verdana, sans-serif";
    min-width: 94%;
    min-height: 95%;
    font-family: 'Muli', sans-serif;
}
#wrapper {

    animation: fadein 2s;
    -moz-animation: fadein 0.25s; 
    -webkit-animation: fadein 0.25s; 
    -o-animation: fadein 0.25s;
    min-width: 100%;
    min-height: 95%;

}

最佳答案

尝试添加:

position:absolute;
bottom: 0;

到您的页脚选择器。

关于html - 页脚不在页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17499750/

相关文章:

css - 在 jQuery Mobile 中使 div 键盘可滚动?

javascript - 如何将一组元素包裹在 div 内联中?

html - 如何让 flexbox 将中心固定和底部固定的 child 放在一起?

CSS。 3 列布局,带有固定位置的侧列

css - css中的孤儿寡母是什么?

javascript - webkit 浏览器 : white flashes on transitions between pages

Javascript If/Else 语句检查内容 :url

javascript - html @MEDIA print {},隐藏标记,在打印中留下空白

jquery - 为网站创建返回顶部按钮

javascript - 有没有办法更改嵌入式 YouTube 视频中的 slider 颜色?