【发布时间】:2010-01-30 05:34:27
【问题描述】:
我在屏幕底部和最后一个 div 之间创建空间时遇到问题。
在 Chrome 中,没有问题,但在 IE 中,边框位于屏幕底部。
<div id="container">
<div id="header">...</div>
<div id="main">...</div>
<div id="footer">...</div>
</div>
最后一个div只有<br />的
这是css...
html,
body {
margin:0;
padding:0;
height:100%;
}
#container {
top:30px;
left:15px;
width:60%;
border:black solid 1px;
min-height:100%;
position:relative;
}
#header {
padding:0px;
}
#body {
background-color:FAF0E6;
padding:10px;
padding-bottom:25px; /* Height of the footer */
}
#footer {
position:absolute;
bottom:10px;
width:100%;
height:25px; /* Height of the footer */
}
就像我说的,在 Chrome 中效果很好,但在 IE 中效果不佳。
我想要的是屏幕顶部和底部的空间。
编辑- 作为补充说明,我什至看不到 IE 中的底部边框。
感谢您的帮助,
-克里斯
【问题讨论】:
标签: html css internet-explorer