working on making the scrollbar appear in the right place

This commit is contained in:
Micah Lee 2014-06-19 20:47:09 -04:00
parent 5865fd60ea
commit 3e65bf7884
2 changed files with 12 additions and 7 deletions

View File

@ -6,6 +6,7 @@ $(function(){
$('#log').append($line);
// scroll to bottom
set_log_height();
$('#log').scrollTop($('#log').height());
}
@ -115,4 +116,12 @@ $(function(){
});
}
});
// make sure the log always has a height set, so it will have its own scrollbar
function set_log_height() {
var new_height = $(document).height() - 140; // header = 100, footer = 40
$('#log').css('height', new_height);
}
set_log_height();
$.resize(set_log_height);
});

View File

@ -1,7 +1,3 @@
html, body {
height: 100%;
}
body {
color: #000000;
font-family: arial;
@ -10,11 +6,10 @@ body {
background-color: #f0f0f0;
min-width: 550px;
min-height: 300px;
overflow: hidden;
}
#wrapper {
position: relative;
height: 100%;
}
#header {
@ -65,6 +60,7 @@ ul#log {
word-wrap: break-word;
font-family: monospace;
border-bottom: 1px solid #000000;
width: 100%;
}
ul#log li {
margin: 0 10px;
@ -100,7 +96,7 @@ ul#log #close-countdown {
}
#footer {
position: absolute;
position: fixed;
bottom: 0;
height: 20px;
background-color: #ffffff;