function heightcc() { var bodyHeight = window.innerHeight; var headerHeight = $('header').height() ; var sheaderHeight = parseInt(headerHeight) ; var footerHeight = $('.bottom-container').height(); var categorydivHeight = parseInt(bodyHeight) - (sheaderHeight + parseInt(footerHeight) ); var windowWidth = $(window).width(); if (windowWidth <= '360') { } else if (windowWidth >= '641' && windowWidth <= '898') { $('#innerpagewrap').css('min-height', categorydivHeight); } else { $('#innerpagewrap').css('min-height', categorydivHeight); } } $(window).resize(function() { heightcc() })