I have writen the following code but from some reason i cant get the box height to stretch I have used overflow but nothing 🙁
As soon as I remove the content_body position absolute then the content div stretches.
#content{
background-image:url(../../../images2/bg.png);
width:1001px;
height:auto;
padding-left: 10px;
overflow:auto;
padding-top:16px;
}
#content_body{
position:absolute;
z-index:6;
overflow:auto;
}
<div id="content">
<div id="content_body">Hello World!</div>
</div>
I wouldn’t use
position:absoluteinstead useposition:relativeas an absolute positioned element has no height or width.You can specify the height on the div. For example
height:100px