www.webdeveloper.com
Results 1 to 4 of 4

Thread: Transparent iFrames

  1. #1
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    49

    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
    Location
    Ankh-Morpork
    Posts
    19,252
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jan 2008
    Posts
    66
    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.

    http://www.nickelleon.com/iframe.php
    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
    Posts
    2
    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:

    Code:
    <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



Recent Articles