I\'m having an issue identical to this poster: Jquery problem with height() and resize()
But the solution doesn\'t fix my issue. I have three stacked divs, and I want to
Okay, how about a CSS answer! We use display: table
. Then each of the divs are rows, and finally we apply height of 100% to middle 'row' and voilà.
http://jsfiddle.net/NfmX3/3/
body { display: table; }
div { display: table-row; }
#content {
width:450px;
margin:0 auto;
text-align: center;
background-color: blue;
color: white;
height: 100%;
}