Harshal Gajjar
Harshal Gajjar

Reputation: 265

Transparent background iframe

The answers for already questions like this doesn't produce the required output.

I have

<iframe src="http://www.foxyform.com/form.php?id=541803&sec_hash=027132f38b1" frameborder=0  allowTransparency="true" style="background-color:rgba(0,0,0,0);"></iframe>

And a jquery code(which probably is wrong :P)

$('iframe').contents().find('body').append('style="background-color:rgba(0,0,0,0);" />');

Basically I want the background to be transparent so my webpage's background image becomes visible. To achieve this I need to add this into the iframe's body tag:

style="background-color:rgba(0,0,0,0);

The above jquery code used isn't working to get the desired results. Any help would be appreciated. :)

Upvotes: 0

Views: 1450

Answers (1)

smistry
smistry

Reputation: 1126

You can only edit the iframe style if it is on the same domain. Bearing that in mind, try

background:transparent;

Upvotes: 1

Related Questions