mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
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:
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
|||||||
@@ -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({
|
$.ajaxSetup({
|
||||||
beforeSend: function(xhr, settings) {
|
beforeSend: function(xhr, settings) {
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
body {
|
|
||||||
/* Make room for the topbar */
|
|
||||||
padding-top: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-content {
|
.top-content {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user