Problem here: http://jsfiddle.net/x8XZ6/3/
HTML
<div id="top"></div>
<div id="content">Why this div is not 100% height? I need this to fill all the way to the start of the footer if content is to little. If content extends beyond the blue footer, it should push the footer down.</div>
<div id="anchored-footer"></div>
CSS
* { margin: 0; padding: 0 }
html { height: 100%; }
body {
position: relative; min-height: 100%;
height: 0;
/* height: 0; interestingly, if height is set to 0, it expands 100% (see also #content margin-bottom) */
/* but I need it to extend up to the blue bar only. */
}
#top {
height: 50px;
background-color: red;
}
#anchored-footer {
position: absolute;
bottom: 0;
height: 50px;
background-color: blue;
width: 100%;
}
#content {
border: 5px solid green; /* because I need this border to go all around the content area */
background-color: yellow;
height: 100%;
/* margin-bottom: -50px; can a negative margin work here? */
}
Can this be achieved without using absolute positioned header?