【问题标题】:my footer is overlapping on content body我的页脚在内容主体上重叠
【发布时间】:2018-06-05 14:59:45
【问题描述】:
我的页脚与我的内容主体重叠,它应始终贴在底部,不应与我的内容主体重叠。
my full web page access:
http://www.acmearchitectural.com/sohail/ptpage1.html
your early reply appreciated.
谢谢
【问题讨论】:
标签:
html
css
twitter-bootstrap
【解决方案1】:
我在您的页面上进行了尝试,以下解决方案对我有用。
试一试。
基本上,您必须在 .footer 类中进行两项更改
display:inline-block;
position: static;
所以你的班级看起来像下面这样。
.footer {
background: #000 none repeat scroll 0 0;
border-top: 1px solid #eaeaea;
bottom: 0;
left: 0;
position: static;
right: 0;
display: inline-block;
}
【解决方案2】:
为页脚添加此样式。
.footer {
background: #000 none repeat scroll 0 0;
border-top: 1px solid #eaeaea;
bottom: 0;
left: 0;
position: static;
right: 0;
top: auto;
clear: both;
}
【解决方案3】:
给页脚一个类,如下所示:
.footer{
margin-top:20px;
}
或者你可以写
<div class="clearfix"></div>
你应该在正文和页脚之间保持一个边距。
替代代码:
.card1 {
background: #FFF none repeat scroll 0% 0%;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
margin-bottom: 30px;
border-radius: 0px;
padding: 0 0px;
margin-bottom: 77px !important;
}