23 February 2012
Home > forum > transparent iframe
 

Problems with iFrame transparency in Internet Explorer.

There are several ways to make an iFrame transparent. Problems that often occur are a grey or white background when you would expect a transparent background. To make it work in all browsers you should check the following two points:

  • Especially for InternetExplorer, add the attribute allowtransparency="true" to your iFrame.
  • Check if the sourcecode of the iFrame is also transparent by adding CSS style background-color:transparent; to its body.
<iFrame src="blabla" allowtransparency="true">

... and then the iFrame's source-code ...

<html>
<body style="background-color:transparent;">
<p>Transparant content.</p>
</body>
</html>
Rate this item
 
 
 
 
 

Rated not yet 

Would you like to comment?




Fields with * are obligatory.

Save