0

I have put an online compiler website inside my website, using an HTML iframe element. Basically, I want the user to compile and write code directly on my website, without opening a separate tab with the online compiler.

Now, I want to know if there is an option to "cut" a part of the website displayed by the iframe element inside my website. Somehow to restrict the user to seeing just the part of that website I want him to see.

I want to mention that I don't want to use any other methods, just the iframe element. Thanks :)

  • You can use the `scrolling=no` attribute on the iframe, and set its size to a specific size, if what you want the user to see happens to be at the top of the framed page and has a specific height. Other than that your options are pretty limited, you can't directly control the contents of a third party iframe. – Daniel Beck Dec 13 '21 at 17:52
  • Does this answer your question? [iframe to Only Show a Certain Part of the Page](https://stackoverflow.com/questions/3272071/iframe-to-only-show-a-certain-part-of-the-page) – Kameron Dec 13 '21 at 20:27

1 Answers1

1

Instead of using a iframe you might want to try this (Jquery)

$('#target-div').load('http://www.mywebsite.com/portfolio.php #portfolio-sports');

From: https://stackoverflow.com/a/3272151/15263184

benjm
  • 57
  • 1
  • 14