I am currently working on creating panels, each with a header and content. My goal is to allow scrolling only within the content area. Here is the CSS I have been using:
.content-div{
float:left;
height: 400px;
overflow-x:hidden;
overflow-y:hidden;
white-space: nowrap;
}
.panel-div{
height:100%;
background-color: red;
display: inline-block;
overflow-y:hidden;
}
.panel-content{
padding: 5px;
height:100%;
overflow-y:auto;
}
.panel-header{
height:100px;
width:400px;
text-align:right;
padding:5px;
background-color: blue;
}
And here is the HTML I have been using:
<div class="content-div">
<div class="panel-div">
<div class="panel-header">
</div>
<div class="panel-content">
<p>test</p>
</div>
</div>
</div>
My issue is that the panel-content div is taking the full height of the content-div, and I am struggling to find a solution to make it 100% of content-div while accounting for the 100px height of the header. I am aware of the calc function in CSS3, but I am interested in exploring other potential solutions. Any suggestions?