CSS使HTML页面页脚留在页面底部具有最小高度 [英] CSS to make HTML page footer stay at bottom of the page with a minimum height
本文介绍了CSS使HTML页面页脚留在页面底部具有最小高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下页面(禁用链接: http://www.workingstorage.com/Sample.htm
),其中有一个页脚,我无法坐在
I had the following page (deadlink: http://www.workingstorage.com/Sample.htm
) that has a footer that I can't make sit at the bottom of the page.
CSS是继承而来的,
The CSS is inherited and befuddles me; I can't seem to change it properly to put a minimum height on the content or make the footer go to the bottom.
推荐答案
页脚随后被赋予负页边距:
The footer is then given negative margin-top:
#footer {
clear: both;
position: relative;
z-index: 10;
height: 3em;
margin-top: -3em;
}
这篇关于CSS使HTML页面页脚留在页面底部具有最小高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文