我想让我的bodyline基本上是我的容器,高度为:
bodyline{
height:500px;
min-height:500px;
height:auto !important;
}
但是当我将它设置为此时,它实际上并不起作用。我的页脚放在中间,它弄乱了里面的页脚div。有没有人有什么建议。也许我犯了错误的代码或者我不确定的东西。
例如
请帮助别人。
答案 0 :(得分:0)
嘿现在在你的css中定义你的div 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;
}
答案 1 :(得分:0)
好的,所以我做了一些人告诉我上面要做的事情。然后发现了
bodyline{
min-height:500px;
height:500px;
height:auto !important;
}
身高:未添加自动,所以我添加了它,请查看jsfiddle http://jsfiddle.net/jAXp2/
并找到此代码
/*Add this as many times as you want to*/
<div id="midSection">
<h2>Updates</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultricies condimentum velit vel scelerisque. Nam id libero sit amet libero ultrices interdum dignissim nec lorem. Maecenas placerat massa sit amet augue interdum rutrum. Fusce vel lectus arcu. Quisque quis elit et lorem suscipit faucibus a ut odio. Proin ut ante consectetur dui mattis pulvinar non quis neque. Proin ultrices lectus vel orci lacinia a iaculis nibh hendrerit. Mauris sagittis aliquam odio vitae pulvinar. Suspendisse id dolor nibh, sed consectetur sem. Phasellus lacinia laoreet sem, ac ultrices libero lobortis quis. Morbi accumsan tempus neque, sed varius lectus molestie imperdiet. Vivamus porttitor facilisis nunc, sed feugiat quam adipiscing ac. Quisque dolor tellus, porta in ultrices sit amet, luctus sed nunc. Quisque sodales scelerisque orci sed ullamcorper. Nunc nisl arcu, dignissim sed tempor eget, blandit a massa. Praesent ut metus enim, in dictum felis. Integer sagittis ipsum eu mauris lacinia rhoncus. Mauris turpis ligula, dapibus nec rhoncus bibendum, tristique eu nunc. Duis dapibus blandit justo et auctor. Nunc non elit vel diam luctus ullamcorper.
Nulla elementum tristique ultricies. Etiam sit amet felis leo, non imperdiet sapien. Suspendisse venenatis, erat ac mollis sagittis, nulla arcu semper felis, a tempus dolor nibh in est. Nullam. </p>
</div>
/*Add this as many times as you want to*/
在它之后多次添加它以查看它的实际效果。
只要需要,你就会看到它扩展了bodyline。