/    Sign up×
Community /Pin to ProfileBookmark

IFRAMES Transparency

Hi all – I am using IFRAMES and loading content into them. However, I need the background to be transparent so the main image on the page is underneath the text in the HTML documents within the IFRAME. I have tried background-color=”transparent” and it doesn’t work. Anyone else come across this yet??

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@StefanDec 18.2002 — Have you tried making both <html> and <body> transparent?

If not try it

<style type="text/css">

html, body {background:transparent;}

</style>

If it doesn't work in browsers you are probably SOL.

<object type="text/html"...> would be another option that is more likely to pick up the background, but browsersupport for including images like this is really bad.

This page also shows a method that should theoretically be possible for you to apply (uning the same images as background) however IE is quite broken in it's CSS support of background images ?

http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html
Copy linkTweet thisAlerts:
@gil_davisDec 18.2002 — has an attribute called "allowTransparency". See

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/allowtransparency.asp

for more information.

It is a Microsoft proprietary attribute.

BTW, I don't think you want quotes around transparent. I believe it is a constant, not a string. In IE, the background-color of an object by default is transparent.
×

Success!

Help @seanb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...