Help - Search - Members - Calendar
Full Version: iframe Not Working
HTMLHelp Forums > Web Authoring > General Web Design
orcainbox
I am trying to insert an iframe but its not working.

Whats wrong with my code?

<div>
<p style="text-align:centre;">
<iframe width="560" height="315" src="https://www.instagram.com/p/B50hlJiH585/?utm_source=ig_web_button_share_sheet" frameborder="0" allowfullscreen></iframe>
</p>
</div>

http://www.orcaaccounting.com/helloFriend.html
Christian J
QUOTE(orcainbox @ Dec 11 2019, 08:40 AM) *

I am trying to insert an iframe but its not working.

Maybe Instagram does not permit some URLs to be framed? Are you using the URL Instagram itself recommends for embedding?

QUOTE
Whats wrong with my code?

Nothing relevant (but the correct spelling in CSS is "text-align: center").

orcainbox
thanks for the er nor re in centre. In Canada we spell it centre nor center.

I removed the instagram link and replaced it with a you tube link but same thing, no iframe shows up on the page.
pandy
Now nothing loads. Your server seems to be down.
orcainbox
QUOTE(pandy @ Dec 12 2019, 07:50 AM) *

Now nothing loads. Your server seems to be down.


No server is up,
http://orcaaccounting.com/helloFriend.html
pandy
So you've changed to Youtube. I think it'll work if you use the whole iframe code youtube wants you to use. At least that works locally. I don't know what the attributes you've excluded do, but they do seem to do the trick.
orcainbox
This code worked

[<iframe width="560" height="315" src="https://www.youtube.com/embed/riFyKUyGb4k" frameborder="0" allowfullscreen></iframe>]

w00t!
pandy
But that's what you had when I looked and then it did not work. It didn't work locally either.
CharlesEF
The new code doesn't have the query string part.
pandy
There wasn't a query string in the old either. I still have it. It's the same as now.

CODE
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=riFyKUyGb4k" frameborder="0" allowfullscreen></iframe>


I changed that to the full youtube tag and then it worked for me.

CODE
<iframe width="560" height="315" src="https://www.youtube.com/embed/riFyKUyGb4k" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2020 Invision Power Services, Inc.