Use these options to remove the frame and scroll bar.
scrolling="no" frameborder="no"
And this code to set the iframe height
var width = $(window).width() var height = $(window).height() $('#frame').css({ width : width, height : height })
If you need to dynamically change the height to fit the window, wrap the code above in a function and use it in the resize event in window , also make a call in the ready document, for example:
function iframeResize(){ var width = $(window).width() var height = $(window).height() $('#frame').css({ width : width, height : height }) } $(window).on('resize', iframeResize) $(document).on('ready', iframeResize)
UPDATED
You also need to carry margins and paddings on the parent iframe page. The default values cause the scrollbars of the parent page. Something like this would be an easy solution if you don't need to carry any other element on the page except an iframe.
* { margin: 0; padding: 0; }
source share