我想让我的 body 线条基本上是我的容器,高度为:
bodyline{
height:500px;
min-height:500px;
height:auto !important;
}
但是当我把它设置成这个时,它实际上不起作用。我的页脚放在中间,它弄乱了里面的页脚 div。有没有人有什么建议。也许我把代码弄错了,或者我真的不确定。
例子
请帮助某人。
最佳答案
嘿,现在在你的 css 中定义你的 div id overflow hidden
#bodyline {
background-color: #FFFFFF;
border-radius: 10px 10px 0 0;
margin: 0 auto;
min-height: 300px;
overflow: hidden; // add this line
padding-top: 320px; //add this line
position: relative;
width: 1000px;
}
#midSection {
color: #000000;
float: left;
height: auto !important;
margin: 0 auto;
min-height: 100px;
padding-bottom: 50px;
padding-left: 30px;
padding-right: 10px;
position: relative;
top: 320px; // remove this line
width: 600px;
}
关于height - bodyline 自动调整大小的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11928486/