January 26, 2010

Transparent iframes

Firefox by default makes all iframes transparent (no effort required from the developer) if you don't define the background css property.

IE requires extra effort to ensure that the hosting page as well as the iframe's content owner both wanted this iframe to be transparent (few may agree with IE's approach while most will condemn M$). Whatever, here is the css (for page loaded in the iframe) and iframe tag declaration that works flawlessly:

body{
    background: transparent;
}



No comments: