div snippets

How to make a DIV element fill the browser window

Tagged fullscreen, div, window, height  Languages css
<style type="text/css">
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
#container { /* div you want to stretch */
  background-color: green;
  height: 100%; /** IE 6 */
  min-height: 100%;
  <div id="container">
    This div should cover the whole page.

Here's an example with header and footer.