css - Jquery not getting the correct screen size -
i don't know problem comes from, did guess in title.
basically, trying
<div id="header">header</div> <div id="content">content</div><!-- max screen height possible --> <div id="footer">footer</div> after doing simple calculation such as: window_height - header_height - footer_height, not fitting correctly in screen. (total 3 divs height bigger window)
function adjustbody(){     var windowh = $(window).height();     var headerh = $("#header").height();     var footerh = $("#footer").height();     var contenth = windowh - headerh - footerh;     $("#content").css("min-height",contenth); } see full code here. jsfiddle
am missing height substract?
reset body/html margin , padding.
body, html {      margin: 0px;     padding: 0px;  } 
Comments
Post a Comment