I have a container div that is a fixed height. It has some content and another child element. I would like the child element to scroll when it has filled the remaining height.
I came up with a solution that seems to work, but I'm not sure it is correct.
<style type="text/css">
#container {height: 100px; width: 100px; border: solid; }
#titlebar { background: gray;}
#app-body {height: 100px; overflow: auto; background: lightblue;}
</style>
Working fiddle. Edit: updated fiddle to remove style tags.
Is there a better way? I don't like restating the container height in the child div.