【发布时间】:2011-04-27 15:00:11
【问题描述】:
我有一个问题一直在尝试解决,但没有任何进展。
这是我的代码摘要:
body {
background-image: url('img/bg_Body.gif');
margin: 0px 0px 0px 0px;
}
#container {
position: relative;
width: 880px;
margin-left: auto;
margin-right: auto;
top: 0px;
min-height: 100%;
}
#content {
position: absolute;
top: 0px;
left: 0px;
background-image: url('img/faux_tile.png');
min-height: 200px;
padding-top: 105px;
padding-right: 80px;
min-width: 400px;
padding-left: 80px;
padding-bottom: 110px;
}
<div id="container">
<div id="content">
Some content here (Varying height)
</div>
</div>
如何在内容和页尾之间添加边距?
faux_tile.png 覆盖到页面末尾,我想要页面末尾和 faux_tile.png 之间的边距,这是显示 bg_Body.gif 的小边距。
【问题讨论】:
-
附带说明,
#content真的需要是position: absolute吗?没有其他方法可以实现您想要实现的目标吗? (我现在无法判断)
标签: html css containers margin footer