Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IFrame background transparent in IE

So i have this iFrame with the class .transparentbg:

.transparantbg{     background-color: transparent; } 

This works fine in Chrome, but not in IE...

Help please?

Greetings

like image 333
Thew Avatar asked Feb 27 '11 15:02

Thew


People also ask

Can iframe background be transparent?

The <iframe> tag is an inline frame. It is used to embed another HTML page within the current HTML page. A transparent iframe can be made by setting its background to transparent. And, the allowtransparency attribute of “iframe” is to be set as “true”.

Can you change the background color of an iframe?

Applying a custom iframe background color Instead of transparency or black bars, you can choose the exact color that fills your iframe. Keep in mind that you'll need to visit your video's player settings to adjust the color of the text and play bar within the player.

What is Allowtransparency iframe?

<iframe src="" allowtransparency="true"> The allowtransparency attribute of the IFRAME element specifies whether to allow a transparent background in the iframe. <iframe src="example.html" allowtransparency="true"></iframe>

Do iframes work in Edge?

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


1 Answers

Add allowTransparency="true" to your iframe

<IFRAME ID="Frame1" SRC="whatever.htm" allowTransparency="true"> 

For whatever.htm add background:transparent to its body tag.

<body style="background:transparent"> 
like image 144
Hussein Avatar answered Oct 11 '22 19:10

Hussein