I am attempting to design a webpage that fills the entire screen height without scroll bars, yet contains a scrollable container within it. Despite trying various approaches with percentage heights, I have not been successful as the percentages do not behave properly when nested.
Below is an example of what I want to achieve. Although I have experimented with multiple variations, none have produced the desired outcome.
HTML
<body>
<div id="pageheader">
<h1>Header</h1>
</div>
<div id="container">
<div id="header">
<h2>Section header</h2>
<p>Header text</p>
</div>
<div id="overflower">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>The <code>overflower
div should be scrollable, while the rest of the page remains static and occupies the full height of the screen.