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
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.