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?
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
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
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.
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:
I hope this helps.
<iframe name="some name" src="url.html" allowtransparency="true">
No commercial links permitted
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread