I had a question regarding CSS and I was truly hoping some of the bright minds could help me out :)
So I have a div with some divs inside of it, as the main div is the content 'background' and the other divs are the top, sides, bottom and the content itself.. I need for the side ones to expand when there is more text than before entered.
I did this before with a white background and it worked like a charm, but the background is a pattern this time and I would like the pattern to stay as a whole all the time. So I want it to have a minimum height (min-height: 22px I've tried) and when theres more space needed, then it should become 44, and then 66,88, and so on..
I really hope I am clear enough and that someone can help me because I'd like some enlightment.
The code:
<div id="main">
<div id="main-top"></div><!-- end of main-top-->
<div id="main-holder">
<div id="main-content">
Jejjajdijdiajsdijasidjasijdiasjd<br><br><br>hehehe
</div><!-- end of main-content-->
</div><!-- end of main-holder-->
<div id="main-bottom"></div><!-- end of main-bottom-->
</div><!-- end of main -->
--
The CSS related to the HTML above:
>--
#main{
width: 999px;
padding: 0;
margin: 0 auto;
}
#main-top{
height: 22px;
width: 999px;
background: url(../images/main-top.png) no-repeat;
}
#main-holder{
background: url(../images/main-holder.png) repeat-y;
width:999px;
height: auto;
min-height:22px;
}
#main-content{
background: none;
width:auto;
margin:0 10px;
padding: 0 10px 0 10px;
overflow:hidden;
}
#main-bottom{
height:22px;
width:999px;
background: url(../images/main-bottom.png) no-repeat;
}
--
Hopefully I was clear enough, thanks in advance!