lets say i have an horizontal webiste ( http://toniweb.us/gm2/ ) and in a certain point i would like to know how much horizontal width is avaliable,
i made this picture so it's easier to understand
So i would need to get the EXTRA SPACE's width
and i am trying like this:
$(window).outerWidth(true)-($('header').outerWidth(true)+$('#nvl1').outerWidth(true)+$('#nvl2').outerWidth(true))
also tried
$(window).width()-($('header').outerWidth(true)+$('#nvl1').outerWidth(true)+$('#nvl2').outerWidth(true))
but in IE8 it's not returning the same value...
and then i need to apply it to the div, i made this function
function rellenarEspacio(){
if(lte8){
var w = $(window).width()-($('header').outerWidth(true)+$('#nvl1').outerWidth(true)+$('#nvl2').outerWidth(true))+$('#nvl2').outerWidth(true);
}else{
var w = $(window).width()-($('header').outerWidth(true)+$('#nvl1').outerWidth(true)+$('#nvl2').outerWidth(true));
}
//alert(w);
$('.extra').css({'display':'block'});
$('.extra').css({'width':w});
return false
}
but is not using the whole space
any idea what I am missing?