I need a solution for auto-adjusting the width
and height
of an iframe
to barely fit its content. The point is that t
Here are several methods:
AND ANOTHER ALTERNATIVE
TO HIDE SCROLLING WITH 2 ALTERNATIVES AS SHOWN ABOVE
HACK WITH SECOND CODE
To hide the scroll-bars of the iFrame, the parent is made "overflow:hidden" to hide scrollbars and the iFrame is made to go upto 150% width and height which forces the scroll-bars outside the page and since the body doesn't have scroll-bars one may not expect the iframe to be exceeding the bounds of the page. This hides the scrollbars of the iFrame with full width!
source: set iframe auto height