2008/07/29

How to allow IE to display iframes with transparent background?

It is easy you know. Just set in your css file the background-color property value to trasparent. Hahah, you got it, it will NOT work. An additional property (DOM one) has to be set - and the winner is: allowTransparency. Just set it to true cos IE takes it false by default.

As of MSDN this is wrong:



The result will be something like this:


But if you add allowTransparency="true" property to the iframe, the desired result should be like this:


Of course Tidy won't be happy with this proprietary property, so you will end up with a warning.

2 comments:

martijn said...

Thanks! this works great...

INVI08 said...

That work perfect, thanks