【发布时间】:2015-09-26 19:55:56
【问题描述】:
正如您在标题中看到的那样,我现在正在创建的网站的正文内容和页脚之间有空白!我正在使用 wordpress 和通过编辑器进行编码,我试图从网站正文和页脚中删除填充和边距。我还尝试将其设置为相对并将其相互移动,但是当我移动它们时,间隙只是移动位置。当我设置页脚的相对位置并添加 -top 以将其连接到正文时,间隙在页面下方。请帮忙!提前谢谢你:D
这是主页面内容的CSS代码,以及页脚:
/* This is inner site (body) content style */
.site-inner {
background-color: #fff;
clear: both;
padding-top: 40px;
}
.minimum-landing .site-inner {
margin: 40px auto;
padding: 60px 60px 20px;
width: 800px;
}
/* This is footer CSS code */
.site-footer {
background-color: #231F20;
letter-spacing: 1px;
padding: 60px 0;
text-align: center;
margin:0;
}
.site-footer a,
.site-footer p {
color: #999;
}
.site-footer a:hover {
color: #fff;
}
.site-footer a {
border: none;
font-weight: 300;
}
.site-footer p {
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size: 14px;
margin-bottom: 0;
}
【问题讨论】:
-
<article>类为.entry的标签具有将页脚向下推的底部边距。您可能需要重组 html 或删除该边距。