I have a Google Maps app that takes up most of the page. However, I need to reserve the top-most strip of space for a menu bar. How can make the map div automatically fill
The way to do it, apparently, is to use JavaScript to monitor the onload and onresize events and programmatically resize the filling div like so:
Using jQuery:
function resize() {
$("#bottom").height($(document).height() - $('#top').height());
}
Using plain JavaScript:
function resize() {
document.getElementById("bottom").style.height = (document.body.clientHeight - headerHeight) + "px";
}
Edit: and then bind these to the window object.