Change Background Color of Iframe Issue

Change background color of iframe issue

An <iframe> background can be changed like this:

<iframe allowtransparency="true" style="background: #FFFFFF;" 
src="http://zingaya.com/widget/9d043c064dc241068881f045f9d8c151"
frameborder="0" height="184" width="100%">
</iframe>

I don't think it's possible to change the background of the page that you have loaded in the iframe.

how to change background color of an iframe using external src

Using iframe settings did not work. However, I was able to conveniently make adjustments on their website and use the HTML generated:

https://www.timeanddate.com/clocks/free.html

Change body background color in an iframe using one css file

I assume the iframe takes up a smaller portion of your site. In that case I would advice you to simply use a div with the same size of the iframe is loaded, and giving this div the proper background-color.

OR: include a style property in the source of the iframe page:

<head>
<style>body {background-color:#COLOR}</style>
</head>

Can I change or control the color of the IFRAME area before the content loads?

It's not too hard:

<iframe id="IFR" src="time.php" style="background-color: #f00;" />

Edit: I neglected to test in IE -- it does work in FireFox. Example at: http://beta.tagcloud.com/contain.html

The example demonstrates that the page quickly switches to all red, and then when the iframe loads (in 5 seconds), it switches to black.

Trying to change background color of iFrame in IE

I think you have to add the background in the page loaded in the iframe.

Example, modify http:/little-apps.org/lilregcleaner/history/1.xx.html

Changing the background colour of a div in an iframe from the parent page isn't working

It looks like this is deprecated:

$('#innerframe').load(function () {

So I have to use this:

$('#innerframe').on('load', function () {

As after 1.8 it's (original code in question) no longer valid

Also:

Instead of

find($(".TitleBG")) use

find(".TitleBG")

As user Wiizl states is another issue.



Related Topics



Leave a reply



Submit