Transparent Iframe in HTML

by Hiroshi on 24-02-2008

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 additional 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.

Related Posts

Share it!
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Add to favorites
  • Share/Bookmark

Post a Comment

Comment will appear here after approval, Thanks for patience