Resize main_div to exactly take up remaining vertical space

Unfortunately, it's not so easy to do this with CSS only.

(imported from commit 93b58a53e20aae9ee651aa66b3163f68549a3982)
This commit is contained in:
Keegan McAllister
2012-08-29 14:30:17 -04:00
parent a1d852d124
commit a2777eaed4
3 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,14 @@
function resize_main_div() {
// Resize main_div to exactly take up remaining vertical space.
var div = $('#main_div');
div.height(div.height() + $(window).height() - $('body').height());
}
$(function () {
resize_main_div();
$(window).resize(resize_main_div);
$('#zephyr-type-tabs a').on('shown', function (e) { resize_main_div(); });
});
$.ajaxSetup({
beforeSend: function(xhr, settings) {
function getCookie(name) {