Positioning an iframe's contents?

  • 1
  • Question
  • Updated 7 years ago
  • Answered
  • (Edited)
Hello,

on one of my webpages, I have an iframe of another webpage.
And I was wondering if it is possible for the iframe to show one particular part of the iframe's website.
Example:

I have an iframe of a site with a game and the main menu on the left of the game. And I want the iframe to only display the game, and forget the main menu on the left. Is this possible?

Thank You.

(P.S. The example is not really my iframe so dont say "just get the game's HTML code :P"
Photo of Mike

Mike

  • 192 Posts
  • 4 Reply Likes
  • Confused

Posted 7 years ago

  • 1
Photo of jeremy

jeremy, Employee

  • 1349 Posts
  • 90 Reply Likes
Hello Mike,

I am sending your post to our code team who will hopefully be able to assist you further.

Please allow them 48 hours to check your site and respond to your post.

Many thanks for working with us on this.
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Hi Mike

I'm a member of the code team Jeremy mentioned :)

I understand what it is that you would like to do. As you have experienced, adding an iframe makes the whole webpage appear inside it. I am not sure whether it is possible to display only a portion of the webpage in an iframe - will need to do some research on this one. I will update this thread if I find a solution that works.

Or maybe someone from the Yola Community has done this and will be able to help!

Nazlie
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Hi Mike

Back again! I've done some research about displaying only a part of the iframe inside a webpage. It is possible to do so, however, we advise against this is because it hides the identity of the original website and is considered copyright infringement if you do so. For more details about copyright information, please see our Terms of Service.

I hope this information is helpful. Let us know if you have any questions.

Thank you
Nazlie
Photo of Mike

Mike

  • 192 Posts
  • 4 Reply Likes
Who said I want to make an iframe of another site? I want to make an iframe of my own. See, there is a HTML editor for a site that doesn't alow the word 'document'. It changes it to 'd0cument.' so I would do all the codes with the word document in the code on yola then make an iframe of that and place it on the other HTML editor.
Photo of Brianna

Brianna

  • 2045 Posts
  • 92 Reply Likes
Hi Mike,

To add an iFrame to your page, drag and drop and HTML Widget and then paste the following code:

<!--iframe src ="http://www.google.com" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe-->

Replace "http://www.google.com" with the URL you want to use.

Please keep in mind that you can certainly embed a word document to your Yola site, here's how:
1. Log in to your Google Docs account.
2. Upload your existing Word document to Google Docs. You will find the "Upload..." button just underneath the Google Docs logo on the top left of your screen.
3. Once your document is uploaded, click on the name to open it as a Google Doc.
4. Click on the down-arrow on the "Share" button (top right) and select "Publish as web page". This will generate a web address (URL) that is the published version of your site on the web.
5. Copy this URL, as you will need to add it to your Yola site inside an iFrame.
6. Go back to your Yola site and add an HTML Widget to your page where you would like the document to display. You will find the HTML Widget under "Basics" in Sidebar on the right-hand side of your screen.
7. Paste the following code into the HTML editor that opens up:
<!---iframe src ="https://docs.google.com/View?id=1234a..." width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe-->
8. Replace "https://docs.google.com/View?id=1234a..." with the URL of your Google Doc.
9. Click OK to save the HTML code. You will see the iFrame appear on your page, with the
10. Click "Save" to save your page.

I hope you find this helpful! (Don't forget to remove the !--- and -- from the coding as this helps to make the code visible to you, instead of embedding it onto this forum)
Photo of Mike

Mike

  • 192 Posts
  • 4 Reply Likes
Thanks.