div com altura mínima dinâmica com base na altura da janela do navegador

Eu tenho trêsdiv elementos: um como cabeçalho, outro como rodapé e um conteúdo centraldiv.
adiv no centro precisa se expandir automaticamente com o conteúdo, mas eu gostaria de ummin-height de modo que o fundodiv sempre atinge pelo menos a parte inferior da janela, mas não é fixado em páginas mais longa

Por exemplo

<div id="a" style="height: 200px;">
  <p>This div should always remain at the top of the page content and should scroll with it.</p>
</div>
<div id="b">
  <p>This is the div in question. On longer pages, this div needs to behave normally (i.e. expand to fit the content and scroll with the entire page). On shorter pages, this div needs to expand beyond its content to a height such that div c will reach the bottom of the viewport, regardless of monitor resolution or window size.
</div>
<div id="c" style="height: 100px;">
  <p>This div needs to remain at the bottom of the page's content, and scroll with it on longer pages, but on shorter pages, needs to reach the bottom of the browser window, regardless of monitor resolution or window size.</p>
</div>

questionAnswers(7)

yourAnswerToTheQuestion