<!doctype html>
<html lang="en">
<head>
<title>Header/Footer Vertical Centering Test</title>
<style type="text/css">
/* Set document height*/
html, body { height:100%; }
/* Set container height and context */
#container { position:relative; min-height:100%; }
/* Declare positioned children of container */
#masthead, #footer { position:absolute; }
/* Position masthead */
#masthead { top:10px; }
/* Position and layer footer */
#footer { bottom:0; z-index: 2; }
/* Set fluid height for footer */
#footer { height:5%; }
/* Set padding for content header placeholder */
#header { padding-bottom: 10%; }
/* Set fluid height and display for middle container */
#middle { height:60%; display:table; padding-bottom: 5%; }
/* Set display and vertically centered content */
#vertcenter { display:table-cell; vertical-align: middle; }
</style>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="middle">
<div id="vertcenter">
Content
</div>
</div>
<div id="masthead">
header
</div>
<div id="footer">
footer
</div>
</div>
</body>
</html>