The easiest method is to use box-sizing: border-box
and set fixed percentage heights on the elements. If you're looking for fixed heights on the footer/nav and dynamic heights on the content, it'll be tricky.
Usually I use a wrapper that's position: absolute
to the viewport just below the header and just above the footer, and then a div inside that for the content, which uses height: 100%
The second method:
<nav>nav</nav>
<div id="wrap">
<div class="content">content</div>
</div>
<footer>footer</footer>
html,body { margin: 0 }
nav, footer { height: 20px; background: blue }
footer { position: absolute; bottom: 0; width: 100% }
#wrap { background: gray; position: absolute; bottom: 20px; top: 20px; right: 100px; left: 100px }
#wrap .content { height: 100% }
The wrapper will act as the fixed height for the content when the window is resized.
Luckily as browser's adopt css3, this will be even easier with flexbox.