Reputation: 33
I have an iframe on HTML page, and I want to hide vertical "scrolling".
In my CSS, I input this, but I didn't get results, scrolling is still visible.
iframe{
overflow:hidden;
}
Also, i try to use "style= scrolling="no"" but still withouts success.
Upvotes: 0
Views: 594
Reputation: 446
You can use <iframe src="#" scrolling="no"></iframe>
.
Hope that helps!
Upvotes: 1
Reputation: 1550
If iframe content is in same domain and If you are ready to use JS to hide scroll inside iframe content, you can use this:
var elem = document.getElementById("if");
elem.contentDocument.body.style.overflow="hidden"
considering "if" as id of your iframe.
or use scrolling="no" as mentioned in another answer.
Upvotes: 0
Reputation:
scrolling="no"
is an attribute, not a CSS property. It doesn't need to be wrapped in style
:
<iframe
src="https://example.com/"
width="100" height="100"
scrolling="no"
>
</iframe>
Upvotes: 1