I have a fairly standard page layout -- header, div with content and footer
<header>
<div id="banner">
Header
</div>
</header>
<div id="main">Content</div>
<footer><a href='#'>Terms of Service</a></footer>
I would like the footer section to take up the remaining height on my HTML page so I applied these styles
html {
height: 100%;
}
body {
margin: 0;
text-align: center;
height: 100%;
}
footer {
background-color: #003162;
padding: 5px;
height: 100%;
font-family: Arial, Helvetica, sans-serif;
font-size: 80%;
}
footer, footer a {
color: #fdb515;
}
What is odd is that the footer is taking up too much space. It is causing a scroll even though that's not what I requested -- https://jsfiddle.net/g7Ldc7pt/2/ . How do I tell the footer to take up the remaining visible space? I only want a scroll bar if the content isn't visible but its all there.