我有一个容器,其中有一些 div:页眉、内容、页脚(作为标准应用程序)。
这是结构:
<body>
<div>
<div id="ROOT" >
<div id="ROOT_0" >
Header
</div>
<div id="ROOT_1" >
Content
</div>
<div id="ROOT_2" >
Footer
</div>
</div>
</div>
</body>
实际的 CSS:
html {height:101%;}
body {background:#999999;}
#ROOT{ background-color:#333333; width:980px; margin-left:auto; margin-right:auto; overflow:auto;}
#ROOT_0{background-color:#FF9933; width:970px; text-align:center; float:left; margin-top:5px; margin-left:5px; margin-right:5px; margin-bottom:5px;}
#ROOT_1{width:980px; text-align:center; float:left; background-image:url(../img/sfondofc.jpg);}
#ROOT_2{background-color:#FF9933; width:970px; padding-top:5px; padding-bottom:5px; text-align:center; float:left; margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px; font-weight:bold; font-size:13px;}
background-color:#FF9933; width:970px; padding-top:5px; padding-bottom:5px; text-align:center; float:left; margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px; font-weight:bold; font-size:13px;
不幸的是,在 IE (6) 上我看不到 margin-bottom:5px;最后,我有页脚的地方。我需要更改哪个属性?干杯
最佳答案
为什么将 html 的高度属性设置为 101%?
关于CSS - IE 不从最后一个 div 获取边距底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3927832/