3

enter image description hereI have to work on a project and I am facing a problem of not removing the scroll from the iframe. actually, I am trying to pass several pages in a single iframe. So the iframe height is not set according to the content.

I tried a lot of javascript code but none of them works.

  • 2
    Please post minimal demo – Om Sao Apr 09 '19 at 04:57
  • 2
    Welcome to SO. Please add your code into snippet so we can trying to help you. – jaydeep patel Apr 09 '19 at 04:57
  • Hello Rahul, By your Question I can assume that you are working on a iframe from Cross origin. Check this out https://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe – Atul Rajput Apr 09 '19 at 05:11
  • In the iframe, use a bit of JavaScript that informs the parent window of the height of the document. Then let the parent window resize the iframe. – Mr Lister Apr 09 '19 at 06:10
  • I have 21 webpages and I am targetting them to the same frame so it's really difficult to understand where to run the script. – Rahul Sharma Apr 09 '19 at 18:58

1 Answers1

1
<iframe src = "" scrolling = "no"></iframe>
<style> 
iframe{
  overflow: hidden;
  }
</style>

Try this, it should disable the scrolling in iframes

Monish De
  • 33
  • 9