Tuesday, January 3, 2012

iFrame Transparency Problem in IE and Solution

With the default setting, IE sets the background color of a HTML body to white if no value is set.

For other browsers, the background color is set to transparent by default.

In order to make IE iframe HTML to accept transparency, one has to set both the iFrame and HTML body value correctly.

The iFrame:

<iframe src="dummy.html" width=400 height=400 allowtransparency="true">


Inside dummy.html:

<body style="background-color:transparent">


Well, that's the fix for IE. Just two small steps.

Yes, this is my 2nd post in 2012. Happy belated New Year!!!

No comments:

Post a Comment