CSS - IE 不从最后一个 div 获取边距底部

标签 css internet-explorer margin

我有一个容器,其中有一些 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/

相关文章:

带有计算变量的 css calc

android - 删除 LinearLayout (Android) 中按钮之间的空间

html - CSS margin 恐怖; Margin 在父元素之外添加空间

html - Safari 使用 Flexbox 将水平导航显示为垂直

Javascript 图像在 IE 中的行为不同

css - 如何在 Bootstrap 3 中创建垂直面板列表

javascript - IE TextRange 选择方法无法正常工作

html - Internet Explorer 9 与 Internet Explorer 11

html - 边距:CSS3 中的自动属性

javascript - 使用window.print()时如何添加水印?