IT WAS THE DEFAULT MARGIN ON THE <UL>
!! SORRY
I've got a list of anywhere between 5 and 20 items and I want to make the whole list fill the height of the screen. So I'm finding the height of <html>
and dividing it by the number of <li>
s and setting this number as the height of each <li>
. The problem is there is this roughly 20px white space at the bottom that comes up after the list. I think I need to find the height of the window or body or something instead. Here is some of my code:
var numRootOptions = $('.wrapper > ul > li').size();
var htmlHeight = $('html').height();
var newliHeight = htmlHeight / numRootOptions;
$('.wrapper > ul > li').css('height', newliHeight);
setInterval(function() {
var htmlHeight = $('html').height();
var numRootOptions = $('.wrapper > ul > li').size();
var newLiHeight = htmlHeight / numRootOptions;
var liHeight = $('.wrapper > ul > li').height();
if (liHeight != newliHeight) {
console.log('Different');
}
}, 2000);