这是我的网页HTML:
<body>
<header></header>
<div class="conteudo_representantes"></div>
<div class="rodape"></div>
</body>
我有一些内容在.conteudo_representantes
div中,这些内容超出了.rodape
(页脚)div的范围。
这是我的页面CSS:
.conteudo_representantes {
margin-left: auto;
margin-right: auto;
width: 960px;
min-height:586px;
margin-top:40px;
position: relative;
}
.rodape {
position: relative;
width:960px;
height:50px;
margin:36px auto;
background:transparent url(../img/header_pattern.png) repeat top left;
}
完整的页面源代码可以在此示例中找到。(单击列表的第二行,其中写着:02-圣保罗-首都,以查看此问题的实际情况。)
我做错了什么?
margin: 36px; auto.
但这不起作用... - Prestonclear:both
,我会失去页脚的上边距。 - Prestonmargin-bottom:36px
,现在运作良好!感谢@AndrewPeacock和@JackalopeZero的帮助!!! - Preston