I have a dynamic wrapper centered on the page with a percentage height.
Inside it is a navigation bar with fixed height and a newsfeed that takes up the remaining space (100% of the wrapper minus the navigation bar).
I'm adding new news items to the feed via javascript.
Problem: the container grows with the news. It doesn't grow if it has a fixed height, like 200px; but that's not what i want.
This problem is driving me crazy, any help appreciated!
Check it out here: http://codepen.io/anon/pen/vedwA
[UPDATE]
What if I have a textarea in the #itemsContainer instead of the newsfeed? The textarea of course has also to occupy 100% of the height and width of the itemscontainer AND has to stay in that size even if the user pasts in much more text.
In my example the textarea stays within the outer #wrapper but pushes the navigation out to the top. in the codepen example the textarea shows the right behavior but doesn't occupy 100%. in either way, it doesn't work :-( http://codepen.io/anon/pen/nGmua
** Solution **
position: absolute;
top: 50px;
bottom: 0px;
width: 100%;
We're stretching the container not via height = 100% but via a fixed top and a bottom=0px; This works as long as the parent container has position: relative;