Jump to content

Opacity in FF


anonnerz

Recommended Posts

Hey.
Im having an issue using opacity to make shading my main background in FF. It works in IE but not FF.

Ok the basis of what ive done is to make 2 divs over my main background image; the first div has a background of say black with an object opacity (via filter: alpha(opacity=30%) for IE and -moz-opacity: .3 for FF) so now you have a darker shade of the background. Then the second div that is in that first div (the one with the background) has no background and contains all the content. In IE I am able to make the objects opaque using the position: relative CSS tag, however this doesnt work in FF.

Ok that's kinda confusing... so try this:

[code]
body {
background-image: url(Background_Image.png);
}

#div1 {
-moz-opacity: 0.3;
filter: alpha(opacity=30%);
}

#div2 {
position: relative;
}
[/code]

[code]
<div class='div1'>
<div class='div2'>
   Holds all the stuff I want to be fully visible (opacity 100%)
</div>
</div>
[/code]

This technique works in IE but not FF, anyone know why? or another technique to make it work in FF?

Cheers.
Link to comment
https://forums.phpfreaks.com/topic/29872-opacity-in-ff/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.