What I am trying to do is have the header at the top of the page and the footer at the bottom, with the map full up all availiable space in-between. I also want the header and footer to have fixed heights as px not %.
However, at the moment because I set the main map to 100% it forces the footer off the bottom of the page and introduces a scroll bar.
This is my example code: http://jsfiddle.net/W4mXP/20/
CSS
html, body { height: 100%;
width: 100%;
}
#topbar {
height: 50px;
width: 100%;
background-color: black;
padding-left: 50px;
padding-right: 50px;
}
#main {
height: 100%;
width: 100%;
background-color: green;
}
#bottombar {
height: 25px;
width: 100%;
background-color: black;
padding-left: 50px;
padding-right: 50px;
}
.left {float: left;}
.right {float: right;}
HTML
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
</head>
<body>
<!-- Header -->
<div id="topbar">
<div class="left">
Logo
</div>
<div class="right">
<form>
<div id="radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
</form>
</div>
</div>
<!-- Map -->
<div id="main">
Map
</div>
<!-- Footer -->
<div id="bottombar">
<div class="left">
Name
</div>
<div class="right">
About
</div>
</div>
</body>
</html>