I have following iframe in my site:
<iframe src="<<URL>>" height="800" width="800" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no" style="overflow: hidden"></iframe>
And it has scrolling bars.
How to get rid of them?
I have following iframe in my site:
<iframe src="<<URL>>" height="800" width="800" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no" style="overflow: hidden"></iframe>
And it has scrolling bars.
How to get rid of them?
Set all the content to:
The thing is that the iframe scroll is set by the content NOT by the iframe by itself.
set the content to 100% in the interior with CSS and the desired for the iframe in HTML
I tried scrolling="no" in my current browser (Google Chrome Version 60.0.3112.113 (Official Build) (64-bit)) and that didn't work. However, scroll="no" did work. Might be worth trying
For this frame:
I tried this on my css code:
below html5 versions
In html5
but not supported correctly yet
Unfortunately I do not believe it's possible in fully-conforming HTML5 with just HTML and CSS properties. Fortunately however, most browsers do still support the
scrolling
property (which was removed from the HTML5 specification).overflow
isn't a solution for HTML5 as the only modern browser which wrongly supports this is Firefox.A current solution would be to combine the two:
But this could be rendered obsolete as browsers update. You may want to check this for a JavaScript solution: http://www.christersvensson.com/html-tool/iframe.htm
Edit: I've checked and
scrolling="no"
will work in IE10, Chrome 25 and Opera 12.12.You can use the following CSS code:
In order to limit the view of the iframe.