I have made a very simple site. You can see the page (code below) here: https://googledrive.com/host/0B2uK7byfkiwySHc5eU5CM25kcmM/index.html
My problem is the content div (with the sample code, right below the navigation bar). I need it to reach until the footer. I need it to reach until the footer no matter how I resize the page, never going under it, nor leaving too much room between it and the footer.
I would be ok with it not reaching the bottom if the content inside it does not require it do so, however, if the content is scrollable, I need it to reach until the footer. Also, I don't want the whole page to scroll, only this content div.
I have tried many solutions (a container div, tables, jquery resizing, etc.) unsuccessfully, and am a loss to how this can be accomplished. So, I uploaded the basic code without my solutions to see if someone could help me out :)
Thanks!
<html>
<head>
<style type="text/css">
body {
background: #e6e6e6;
}
#title{
margin:0 0 0 0;
text-align: center; font-size:40px;
font-family: "League-Gothic", Courier;
color: #707070; font-weight:600;
}
#navbar ul {
margin: 0; padding: 5px;
list-style-type: none;
text-align: left; background-color: #005ab3;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
#navbar ul li {
display: inline;
font-family: Arial;
}
#navbar ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #005ab3;
}
#navbar ul li a:hover {
color: #005ab3;
background-color: #fff;
}
#content {
background-color: #fff; font-family: Arial;
border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;
padding: 5px; padding-left: 15px; padding-right: 15px;
height: 70%;
overflow: auto;
}
#footer {
position: fixed;
bottom: 0; left:0; width: 100%;
background: #005ab3;
line-height: 2;
text-align: center; color: #fff;
font-size: 15px; font-family: sans-serif;
}
</style>
</head>
<body>
<div id = "title">Title</div>
<div id = "navBar">
<ul>
<li><a id ="link1" href="#">Link 1</a></li>
<li><a id ="link2" href="#">Link 2</a></li>
<li><a id ="link3" href="#">Link 3</a></li>
</ul>
</div>
<div id = "content">
<h1> Sample content (1984)</h1>
<p>It </p>
<p>The </p>
<p>Inside </p>
<p>Outside, </p>
<p>Behind </p>
<p>Winston </p>
<p>The </p>
<p> WAR IS PEACE </p>
<p> FREEDOM IS SLAVERY </p>
<p> IGNORANCE IS STRENGTH </p>
</div>
<div id = "footer">Footer</div>
</body>
</html>