0

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.

Nemus
  • 3,879
  • 12
  • 38
  • 57
Serbon
  • 33
  • 6

4 Answers4

1

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>
1

I fix the problem by adding position: fixed in css.

Serbon
  • 33
  • 6
1

You can use <iframe src="#" scrolling="no"></iframe>. Hope that helps!

Joshua
  • 426
  • 1
  • 10
  • 18
0

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.

Nitesh
  • 1,490
  • 1
  • 12
  • 20