Limit child div size to parent div height with variable sibling

I have a container <div>with the specified height and it is contained inside - two more DIVs for the introductory copy, which will change (entered by the client), and the other for listing the various functions.

I want the functions to <div>automatically fill the remaining space in the parent element and then scroll through the overflow.

How to do it?

CSS

#article {
    width:940px;
    height:500px
}

#article-content {
    margin: 20px 0;
}

#article-features {
    height:100%;
    overflow-x: auto;
}

jsFiddle

+5
source share
1 answer

There is no way to do this with HTML4, other than relying on javascript to dynamically change the height of the bottom div based on the calculation (parent_height - sibling_height).

: CSS HTML-DIV

HTML5 Flexbox . , , . . http://caniuse.com/#feat=flexbox.

+3

All Articles