jQuery(document).ready(function() { var windowHeight = $(window).height(); var headerHeight = $('.page-header').height(); $('iframe#child-page-frame').height(windowHeight - headerHeight).css('margin-top', headerHeight); $(window).resize(function () { var windowHeight = $(window).height(); var headerHeight = $('.page-header').height(); $('iframe#child-page-frame').height(windowHeight - headerHeight).css('margin-top', headerHeight); }); });