I'm facing a unique challenge that I can't seem to figure out. To better illustrate my problem, I've created an image:
Essentially, I have a DIV divided into 3 sections - top, middle, and bottom. All three sections have background images, but I need the middle section (the blue part with borders) to expand as more content is added. The issue is that the content should cover the entire DIV, not just the middle section.
Current setup:
HTML:
<div id="panel">
<div id="top"></div>
<div id="middle">
<div id="content">
Lorem ipsum, etc...
</div>
</div>
<div id="bottom"></div>
</div>
CSS:
#panel {
float: left;
width: 300px;
position: relative;
}
#top {
position: absolute;
left: 0;
top: 0;
height: 100px;
width: 100%;
background: url(top.png) no-repeat;
}
#middle {
float: left;
margin-top: 100px;
width: 100%;
min-height: 200px;
background: url(middle.png) repeat-y;
}
#bottom {
position: absolute;
left: 0;
bottom: 0;
height: 100px;
width: 100%;
background: url(bottom.png) no-repeat;
}
This current approach isn't working for me, so I'm open to any suggestions or ideas to solve this problem!