Thanks for watching.
I am trying to make a very simple responsive HTML layout:
HTML:
<div id="header"></div> <div id="content"></div> <div id="footer"></div>
CSS
#header{ width: 100%; height: 50px; } #content{ width: 100%; height: 100%; } #footer{ width: 100%; height: 50px; }
The end product should be a page with a 50px header attached to the top of the screen and a 50px footer attached to the bottom of the screen. Between the word "content" should expand to fill the gap between the header and footer, regardless of the size of this space.
I have already checked out a few sticky footer guides and, unfortunately, they are not exactly what I want, since they do not take into account the extension βcontentβ in order to fill the gap between the header and footer.
This is a great example of what I need, but this site is written in Flash:
http://www.wearegolden.co.uk/
Try changing the screen size when viewing.
What am I missing here? Thanks!
DECIDE!
HTML:
<div id="header"> </div> <div id="content"> content </div> <div id="footer"> </div>
CSS
html, body {height: 100%; margin:0px !important;} #header{ position: fixed; top: 0; height: 50px; width: 100%; background-color: #777; z-index: 1; } #content{ padding-top: 50px; padding-bottom: 50px; background-color:#ffffcc; position: fixed; top:0px; bottom:0px; width:100%; } #footer{ background-color: #777; position: fixed; bottom: 0; height: 50px; width: 100%; z-index: 1; }
THANKS!
source share