<style type="text/css">
.header
{
background-color: #000000;
margin-bottom: 10px;
}
.body
{
background-color: #FFFFFF;
margin-bottom: 10px;
}
.footer
{
background-color: #000000;
}
.body #content
{
width: 80%;
min-height: 500px;
float: left;
background-color: red;
}
.body #menu
{
width: 20%;
min-height: 500px;
float: right;
background-color: blue;
}
</style>
上面的代码工作,但“margin-bottom”属性不会在正文div的底部创建空间。为什么?CSS保证金不能正常工作
尝试在菜单div后面加上`
`。 – 2011-01-28 19:23:03