...

View Full Version : semi-transparent (or completly transparent) divs?



somebody509
11-08-2006, 01:39 AM
I'm pretty sure theres a way to do this in at least firefox..Is there a way to do it with CSS in both? and if not is there any way I can make them completly transparent?

john_m
11-08-2006, 01:45 AM
opacity: 0.90;
filter: alpha(opacity:90);

oh and if you're really looking for the bleeding edge method: http://www.css3.info/preview/opacity.html & http://www.css3.info/preview/rgba.html

somebody509
11-08-2006, 01:58 AM
Ahh thanks for the reply. So if i have my main body set as a background image, and have the divs semi transparent, you'll be able to see the background image?

john_m
11-08-2006, 02:12 AM
here's a test page you can look at. maybe it'll give you a better idea of the actual implementation.

http://caenim.com/div-opacity-test.html

oh and it's probably worth noting that your css will no longer be valid according to the w3c...

somebody509
11-08-2006, 02:38 AM
here's a test page you can look at. maybe it'll give you a better idea of the actual implementation.

http://caenim.com/div-opacity-test.html

oh and it's probably worth noting that your css will no longer be valid according to the w3c...
Hmmm that works fine in Firefox for me but not IE...I think I found something anyway though. Thanks for the help.

http://myspace.com/fujiok13 MAy be myspace, but they got the job done.

john_m
11-08-2006, 03:18 AM
whoops, was typing a little too fast for my own good and goofed a bit on the part that is supposed to work for IE

filter: alpha(opacity:90); should've been
filter: alpha(opacity = 90);

Arbitrator
11-08-2006, 10:45 AM
oh and it's probably worth noting that your css will no longer be valid according to the w3c...You can ensure validity by validating against CSS3 instead of the W3C validator (http://jigsaw.w3.org/css-validator/)ís default CSS2 and by putting the Microsoft-proprietary CSS inside a conditional comment (http://www.quirksmode.org/css/condcom.html). I suppose itís a moot point if this is going to be used on MySpace, as I suspect, though, since their code is totally invalid.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum