I wanted to create a footer that would take up the remainder of the unused space on my page. I found this example -- Make a div fill the height of the remaining screen space, but it uses flex boxes and I'm not using that in my current page:
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 a {
color: #fdb515;
}
<header>
<div id="banner">
Header
</div>
</header>
<div id="main">Content</div>
<footer><a href='#'>Terms of Service</a></footer>
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.