why does it return 671 when i first time load the page with google chrome but it returns different value when i relad the page
$("#online").css({height: $(window).height()-40-$("#head").height()});
why does it return 671 when i first time load the page with google chrome but it returns different value when i relad the page
$("#online").css({height: $(window).height()-40-$("#head").height()});
Try setting up the layout on load and resize
$(window).on("load resize", function (e) {
$("#online").css({height: $(window).height()-40-$("#head").height()});
});
$("#online").css({ height: $(window).height() - 40 - $("#head").height() +'px' });