I am working on a container with three nested divs: header, content, and footer
<div class="note">
<div class="header">Title</div>
<div class="content" contenteditable="true">Some content</div>
<div class="footer">Footer</div>
</div>
The footer always stays at the bottom of the main container. Some CSS for this layout:
.note {
position: relative;
width: 40%;
height: 200px;
overflow: hidden;
padding: 6px;
margin-top: 10px;
}
.note .footer {
position: absolute;
bottom: 0px;
}
.note .content {
overflow: hidden;
}
The middle div is used for text input. The issue arises when there is too much text causing it to overlap the footer. I need the middle div to be scrollable without overlapping the footer. Setting a fixed height for the middle div is not an option because the parent div may be resizable. Is there any way to achieve this?
You can view a working example here: http://plnkr.co/edit/Jhsn9EziMLs6IUCUg2ah?p=preview