CSS - Transparent Background For Iframe?
Hi,
I'm doing a simple one page layout for a friend which is just an iframe over a picture. The iframe can contain alot of data and the picture isn't supposed to repeat. So... I've got the background image fixed in place with the iframe positioned over it, and it looks fine in firefox and netscape, but the background of the iframe is white in IE. Nevermind, I figured it out... Thanks, Hope Similar TutorialsHi there, I have this style which makes my iframe transparent in IE and FF, but it doens't work in Safari. Does anyone know how to make it work in Safari? PHP Code: filter:alpha(Opacity=60); -moz-opacity: 0.60; Many thanks! Hi, I have a picture frame that is supposed to surround an iframe. The Iframe is a you tube video. My XHTML looks like this: Code: <body> <div id="frame"> <span class="iframe"><iframe width="474" height="296" src="http://www.youtube.com/embed/M5fEEr3U9kU" frameborder="0" allowfullscreen></iframe></span> </div> </body> My CSS looks like this: Code: #frame{ z-index:9999; background-image:url('../images/iframe/frame.gif'); background-repeat:no-repeat; /*position:absolute; */ } .iframe{ z-index:1; margin-left:118px; margin-top:104px; width:474px; height:296px; /*position:absolute; */ } And here is the page: click here Is this doable? If so, what am I doing wrong? thanks - Hey everyone, I ran into an odd problem, I've implemented a workaround and got the desired result but I'm still confused as to why the proper solution didn't work. Here is what I was trying to do. I'm working on a web based application and the previous coders were ****, which is why they're all gone now, there are soo many bugs that require entire rewrites that we're just hacking them away piece by piece. Anyway, one thing they do is instead of going to the database whenever they need information, they cache all of the information in the ASP engine for the page that is being loaded. As you can imagine this results in some long load times. So they implemented a loading screen. Basically they loaded an iframe with an src of about:blank and within it they had a div and some tables with gif images. And we wanted to see the page that the loading screen was called from with a transparent png image making everything seeming to be greyed out using a transparent png. What I did was set the iframe(class="shimFrame") allowtransparency=true and set .shimFrame body tag style property background-color:transparent; Once that was done I gave the loading div which was 100% height and width to have the transparent image background. It worked, but behind the image I still saw the iframe white background. I remove the iframe and everything works as I expected but I don't know why the iframe allowtransparency=true didn't do what I wanted it to do. Maybe I misunderstood what it does, I figured it would let you see past the iframe background and see the page that the iframe was a part of. Anyone have any ideas? I don't know if this should be in css or html since it could be something missing from either. Also the web app is currently only supported under IE but in version 2 it will be properly designed(there are no design docs for this app) and it will be browser independent, since some of the clients we're looking to get currently require firefox for some of their other software. I'm more or less trying to find the reason why the possible proprietary property didn't work as documented. yes my friend has on her site scrollable screen separate from the fixed background but in the code its listed <style type="text/css"> table, tr, td { background-color:transparent; border:none; border-width:0;} body { background-color:91A4F3; now what would the optional choice of turning the transparent off? opaque? I was wondering if there is a way to make your wrapper have a background color to make your font more readable but still be transparent so that you still can see the body background pic? Hopefully this doesn't sound like a stupid question. Is that possible? What would be the code for that? Hello I have a background image in my web site which is centered and fixed with no repeat. I would like to make it some what transparent. I know that it can be done by manipulating the image itself, but I need to do it dynamically using CSS. I tried adding the filterpque(alpha=0.5 style=0) attribute to the body but that made all the elements in the body (except for background image) transparent. does anyone know how I can do it? I have divs layering on top of each other, and they have background images (gifs). In Firefox, the transparency looks fine, but in IE the transparent areas are colored in. How can I fix this? thanks. Hello, Tried searching and couldn't find anything. I want my header's background to match that of the body. Essentially, a "see-through" header. Shouldn't this be some easy markup? Thanks. Hi, The page in question can be found he http://serve5.net/xcage/. Basically, if you view it in Firefox/Mozilla, the background png for the element that contains the date is transparent with a tint to it. However, if you view the page in Internet Explorer, it is gray rather than transparent. Could someone take a look and tell me what's wrong? The CSS can be found he http://serve5.net/xcage/css/standard.css. Thanks, Rob. Are there any workarounds to get a transparent png that is being used as a background-image to be affected by background-: position, attachment, or repeat. This site says it's not possible: http://www.satzansatz.de/cssd/tmp/a...ansparency.html But Im hoping that over time someone has come up with a fix ... Thanks, Mark I want to make a css "div-popup", and when it pops up the whole page behind the popup should be covered in 50% transparent black. I suppose this has been done before, but I failed to google it, I don't know what to search for Any ideas? Hi everyone. developing a page where I use CSS style #content { width: 760px; background-image: url(didyouknow1.png); background-repeat: no-repeat; background-color: #cccccc; height: 300px; } Page background is #cccccc. When I add the div tag <body> <div id="content">Content for id "content" Goes Here</div> </body> and preview in IE 6 there is a lighter color gray AROUND the image . Have not tested in FF. IMAGE Attached. Any suggestions how to make the tranparency really work? Looks fine in Dreamweaver8. Thanks Roman is there a way to set background color of a text box to transparent? I expected this to be working: 'background-color:transparent; I have a floating div on top of a larger div that has a background. What I would like is to have the background of the floating div transparent so the background can be seen. However, when I make it transparent, it forces my text to be transparent also. Any ways around this? Hey All! Hope i didnt scare tooo many people off with the title! Im new to playing around with transparency and am having trouble with getting the affect i want! What i want: 1. Page background as a large picture (1280 x 1024) non repeating etc. (The picture is of a grassey field) 2. a semi transparent rounded white box that sits in the middle (dimensions 735x 550) 3. on top of the semi transparent box i want my content. The reason i want it semi transparent is because i want the main background to come through and be visible through the content. and if the page is resized etc that the semi transparent box can move over the background and show the background whereever it is! Problems: 1. My first attempt i could get 90% of the look i wanted. I got the semi transparent box floating in the middle of the page and showing the background through perfectly. as soon as i add content the content is also transparent. i tried adjusting the trnasparency for the content but that didnt work. e.g. Code: <div id="semiTransBox"> <div id="content">blah blah blah</div> </div> note i dont have my actual code in front of me so please try and work with this! The wording "blah blah blah came out as transparent as its parent semiTransBox. Not what i wanted! I understand this is something to do with the parent child relationship with transparency so i tried something different for my second attempt: 2. i created the semi Transparent box and then added a second fully transparent div below which was positioned using css to move up 500px to fit over the semi transparent box. using top:-500px; position:relative e.g. Code: <div id="semiTransBox"></div> <div id="transBox"> <div id="content">blah blah blah</div> </div> The content is not transparent now but there is still a problem The problem is now because i have created the second div below the first it has caused the browser to add scroll bars to the window and shows white are where the main picture doesnt fill. is there a way to get rid of the space where the second div used to be? i really hope that essay made sense! thanks Hi everyone, I am using nivo slider for a website that I'm building. I have created a gradient png for the background of the captions that will go over the slider images. Everything is working perfectly in ie9 and FF, however in ie8 and 7 all I get is a big black block where the gradient should be. The strange thing is that if I set a background color, then the gradient shows through. I have tried to make the background transparent with no luck at all. I have tried to set the background-color to transparent, and made it !important. I've also tried to use filters, nothing seems to work. The URL of the site is http://www.backupstorage.co.za/new/ . If anyone out there can help, I really would be incredibly grateful! hello mates, for the "footer" of my webpage, i need to have the left part holding a transparent gif image (can be background image or html object, don't care as long as it shows correctly the background image of the page), and the right part to extend to the rest of the containing "footer" div, with a background-color. But i can't make the two cohabitate peacefully. :'( i've tried with divs, span and p, no matter what it does not work. here is the way i first thought it would work: Code: <div id="footer" style="clear:both;width:100%"> <div id="transparentImg" style="width:460px;height:22px;background:url(image.gif) no-repeat"></div> <div id="colorstripe" style="width:inherit;height:22px;background-color:red;text-align:right">disclaimer</div> </div> any idea how to make this happen ? Hey All, It's been a while, and my CSS knowledge is a bit rusty (not that it was ever all that;-). Anyway... Working on a custom wordpress admin write panel, I have a table with dynamic classes in a helper.css for indicating row status(includes .myclass tr:hover), which works great everywhere EXCEPT in our old friend IE6. Turns out that the wordpress "global.css" for admin panels defines the following: Code: html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi g, cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt ,dd, ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td { margin:0;padding:0;border:0;outline:0;background:transparent;} where, though I can't remember how I stumbled onto it, upon removing "background:transparent;" in wp admins global.css everything is hunky dory in IE6 too -- ok, not the tr :hover{ because IE6 only supports :hover on <a>s. but at least the row classes are displayed with no other discernible impact on this or any other admin pages in IE6 or any other browser. Of course, I don't want to go changing wordpress core code just to scratch my little itch, but I was hoping someone might suggest a means of overriding the background:transparent in wp admins global.css either in my own helper.css or in the on the page itself? Hello, after a few hours I managed to identify the CSS element responsible for this problem. However so far I have no solution on how I could solve this problem. Basically the problem is very minor but still frustrating. I am using the following command to set a DIV element with transparent background; Code: filter: progid:DXImageTransform.Microsoft.gradient (gradientype=0,startColorstr='#60ff0000', endColorstr='#60ff0000'); The DIV element becomes transparent. However the parent element - which is set with the CSS attribute overflow:hidden - is always displaying an extra pixel on the right of the container. This might not be clear at first, which is why I attached the following screen shot. (the light red line is the extra 1px I am referring to) If I remove the transparency CSS attribute for IE8 then this extra 1px will disappear. However that means loosing the wanted transparency. I have also developed the following example of the problem; Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style> body { margin: 0px; padding: 0px; /* * IE hack to center .content div (part1). */ *text-align: center; } div.content { width:600px; margin: 0px auto; /* * IE hack to center .content div (part2). */ *text-align: left; } div#a { border-bottom: 1px solid grey; border-top: 1px solid grey; padding-bottom: 5px; padding-top: 5px; } div#a div#b { overflow: hidden; height: 280px; position:relative; } div#a div#b div#c { position: absolute; } div#a div#b div#c img { border: none; display: block; } div#a div#b div#e { background-color: red; color: #fff; position:absolute; padding: 20px 10px; width:260px; height: 240px; margin-left: 500px; /* IE8 hack for background colour with alpha value */ filter: progid:DXImageTransform.Microsoft.gradient (gradientype=0,startColorstr='#60ff0000', endColorstr='#60ff0000'); } </style> </head> <body> <h1>Test 5</h1> <div id="a" class="content"> <div id="b"> <div id="c"> <img src="pic.png" /> </div> <div id="e"> hello </div> </div> </div> </body> </html> Does anyone know what's causing the problem and how I can solve it. It is true that 1px might not sound much. But it still frustrates me knowing that it is there and the fact that on Firefox all works great. http://www.senti.ca/~kgf/programs/pickleball/ So here's the question... how do I make this picture, not transparent? Right now it's at 75% transparency on top of that background which makes it look very faded. Any ideas? I have tried: Code: filter:alpha(opacity=100); opacity: 1; -moz-opacity:1; And placing it inside of a div... sadly this doesn't work. |