Making Transparent Iframe

To make an iframe transparent (background of the iframe page is visible through the data from the other page), you just need to use 2 additonal code snippets.

1) In the iframe code add ALLOWTRANSPARENCY=TRUE
2) In the content page (the page seen through the iframe), add
<style type=”text/css”>
body
{
background-color: transparent
}
</style>

And you are done. Iframes are not recommended for pretty fair reasons but sometime depending upon requirements of websites it becomes necessary to use iframes and with design based websites we have to take care about backgrounds of design which iframe can disturb. By this code transparent iframe can be used easily.

Published
Categorized as HTML

Leave a comment

Your email address will not be published. Required fields are marked *