HTML embedded iFrame not displaying in Chrome

29,497 views
Skip to first unread message

Sarah

unread,
Jul 26, 2015, 6:08:03 PM7/26/15
to Chromium-discuss
Hi - is anyone else having issues getting embedded iFrame content to display in Chrome?  The following URL seems to work on all other browsers with the exception of Chrome:


The code is simple:

<iframe src="http://www.secure-booker.com/nail/MakeAppointment/Search.aspx"  sandbox="allow-same-origin allow-scripts allow-popups" scrolling="auto" frameborder="0" align="center" height = "550px" width = "950px">
</iframe>

I'm not a hardcore developer, but looking for any suggestions as to why Chrome might be blocking this iFrame and any suggestions to get it to render properly...

Thanks in advance.

Aimee Hovis

unread,
May 30, 2016, 9:30:59 AM5/30/16
to Chromium-discuss, sarah...@gmail.com
I am also having an issue with my iframe loading as well as the rest of the people at my school. Here is my website: https://sites.google.com/a/greenvilleschools.us/mrs-hovis-class/

This is the code embedded into the website:

<iframe style="OVERFLOW: hidden" height="1500" marginheight="0" src="https://aimeehovis.wix.com/firsties#!home/mainPage" frameborder="0" width="990" marginwidth="0" scrolling="no"></iframe>

This site has worked in the past and only currently stopped working for no reason.  If someone could help, I would greatly appreciate it!  Also, is there any way to get the iframe to automatically adjust to the height needed for the page?

Thanks!

Daniel Ferenc Szak

unread,
Jun 1, 2016, 11:32:19 AM6/1/16
to aho...@greenvilleschools.us, Chromium-discuss, sarah...@gmail.com
The page http://www.nailstudioboulder.com/#!appointments/cie0 gives the following error in the console:

Refused to display 'http://www.secure-booker.com/nail/MakeAppointment/Search.aspx' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' http://www.nailstudioboulder.com http://*.nailstudioboulder.com nailstudioboulder.com *.nailstudioboulder.com".
Check this stackoverflow thread.

The page https://sites.google.com/a/greenvilleschools.us/mrs-hovis-class/ gives another one:

Mixed Content: The page at 'https://sites.google.com/a/greenvilleschools.us/mrs-hovis-class/' was loaded over HTTPS, but requested an insecure resource 'http://aimeehovis.wix.com/firsties#!home/mainPage'. This content should also be served over HTTPS.

The second one can be "converted" into a warning (understanding the security risks involved) following the instructions given on the very same page:

Inline image 1

Of course as far i understand the proper solution would be changing all references from "http://" to "https://" (scripts, css, fonts, api calls, etc)

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

mohamed bakir al-oraibi

unread,
Feb 24, 2019, 3:20:36 AM2/24/19
to Chromium-discuss, sarah...@gmail.com

Finally after many investigations and searches the below code solve the issue:

<style type="text/css">
iframe {
  border: none;
  width: 100%;
  height: 500px;
}

@media (min-width: 1024px) {
  .content_viewport {
    border: 0px none;
    height: 900px;
width: 100%;
  }
}
@media (max-width: 1023px) {
  .content_viewport {
    border: 0px none;
    height: 900px;
width: 100%;  }
}
@media (min-width: 768px) {
  .content_viewport {
    border: 0px none;
    height: 900px;
width: 100%;  }
}
</style>
<div style=" overflow: hidden; margin: 15px auto; max-width: 880px;"><iframe class="content_viewport" scrolling="no" src="<Your URL>"></iframe>
<p>&nbsp;</p>
</div>
Reply all
Reply to author
Forward
0 new messages