I am attempting to have my footer pushed to the bottom of the page, regardless of how little or how much content is on the page. Most of my pages push it to the bottom no problem, but ones with less content have a floating footer midway down the page. Even though I have
html,body{height:100%}
the content section does not gain height when
#content{height:100%}
is set. I have messed with
clear:both
overflow:hidden
#content:after{}
to no avail.
<html>
<body>
<header>
<h1>Header Name</h1>
</header>
<section id="content">
<p>Temp Text</p>
</section>
<section id="footer">
<footer>
<p>All rights reserved</p>
</footer>
</section>
</body>
</html>
Edit: Using viewport-height (vh) units has let me extend the height of the content section, but is effected by the header above. So if my viewport is 900px with a 200px header, my footer is pushed 200px below the viewport.