div avec la dynamique min-hauteur en fonction de la hauteur de la fenêtre du navigateur

J'ai trois div éléments: l'un comme en-tête, comme un pied de page, et le contenu du centre de div.
la div dans le centre de l'augmenter automatiquement avec le contenu, mais je voudrais un min-height tels que le fond div toujours au moins atteint le bas de la fenêtre, mais n'est pas fixe, il y a sur les pages plus longues.

Par exemple:

<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>
InformationsquelleAutor Bryan | 2011-09-23