小编Dav*_*vid的帖子

CSS页脚不会粘在页面底部

我在css布局中设置粘性页脚有些困难.我一直试图从http://www.cssstickyfooter.com/那里得到这个想法,但如果div中的内容不够高,则页脚不会停留在页面底部.

css文件:

* {
 margin:0;
 padding:0;
 } 

body {
 height:100%; 
 margin:0px; 
 padding:0px;
 }

#wrap {
 min-height: 100%;
 }

#container {
 overflow:auto;
 padding-bottom: 150px;
 text-align:left;
 width:800px;
 margin:auto;
 }

#header {
 height:240px; 
 margin-top:20px;
}

#navigation {
 float:left; 
 width:800px; 
 margin-top:20px;
}

#content-container {
 float:left;
 width: 800px;
}

#left {
 clear:left; 
 float:left: 
 width:480px; 
 height: auto;
 margin: 20px 0px 20px 0px;
 padding: 20px 10px 20px 10px;
}

#right {
 float:right; 
 width:275px; 
 height:auto;
 margin: 20px 0px 20px 0px;
 padding: 20px 10px 20px 10px; 
} …
Run Code Online (Sandbox Code Playgroud)

css positioning footer sticky-footer

6
推荐指数
1
解决办法
9563
查看次数

标签 统计

css ×1

footer ×1

positioning ×1

sticky-footer ×1