Results 1 to 4 of 4

Thread: Transparent iFrames

  1. #1
    Join Date
    Aug 2008
    London, UK

    Exclamation Transparent iFrames

    I want to include iFrames on my site, but I want it to blend with the background therefore I'd like the background transparent. How do I go about doing this?

  2. #2
    Join Date
    Aug 2004
    To the best of my knowledge, the only way would be to have control of the page being loaded into the iframe, and then setting that page's background to the desired color. Otherwise you might have to look into some server-side scripting option to grab the page contents and parse/massage it to get the desired look.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Jan 2008
    As long as the web page the iframe is loading doesnt have a background set, and the iframe doesnt have a background set, it should be transparent by default.

    I added an iframe and loaded an html page with 5 paragraphs, and nothing else. If I were to set a background color on the body of the page the iframe was loading, then the background color would display instead of the transparency.
    Need help bringing your website to life? http://www.nickelleon.com

  4. #4
    Join Date
    Dec 2008
    It might work to pursue this using CSS. For instance if you put your iframe inside div tags and you set the div to be transparent that might work.

    I think there is also a property for iframes that you have to set, like so:

    <iframe name="some name" src="url.html"  allowtransparency="true">
    I hope this helps.

    No commercial links permitted

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center