Search code examples
javascriptjqueryhtmlcssbsp

Shrink a webpage to fit the iframe dimension


I am trying to fit the contents of the webpage into an iframe whose dimensions are fixed.

I need to resize the page such that the complete page fits in the given dimensions of the iframe without truncation.

And I do not need scrollbar, the page should fit without a scrollbar.

I have tried something like this, but didn't work.

<iframe width="650" height="350" src="http://www.bbc.co.uk" style="-ms-transform: scale(,);"></iframe>

Solution

  • I'm afraid you cannnot. you options would be use site speicfic css to reduce the size of elements.

    if you don't want scroll-bars try overflow:hidden css property.

    Check this stack overflow duplicate