I have the following snippet in my page:
<div class="main">
<div class="header">
<div class="heading">Heading</div>
<div>Arbitrary amount of header content.</div>
</div>
<div class="body">
<div>Arbitrary amount of body content.</div>
</div>
</div>
I would like for the .body within the .main div to be vertically scrollable, while the .header remains at the top.
I've put together a short example using JSFiddle with the whole .main scrollable.
I have searched and looked for other solutions but they all seem to either involve having a fixed header height (which I do not) or using some horrible table structure (like in this JSFiddle).
Edit: A few other restrictions: the solution needs to support IE9 and be responsive (i.e. .main should work regardless of it's height.)