Jump to content

Opacity


Recommended Posts

Hello I have a background and then I made a section of it have a certain opacity...... When I put text / pics on top of the opaque area it is effected by it. Is there a way to make the text/ pics not effected by the opacity???for you to see an example --- just change the opacity to 20 (ie) and .2 (firefox) on the tryit editor --- it makes the opacity more visible on the text.http://www.w3schools.com/css/tryit.asp?fil...ss_transparencyThanks a ton!

Link to post
Share on other sites

I don't mean to sound rude, but computer stuff is pretty specific, and this sentence of yours really doesn't makes sense: Hello I have a background and then I made a section of it have a certain opacity . . .A background is a property. Opacity is a property. A property cannot have a property.If you mean that you have a div that contains a background image, and you have adjusted the opacity of the div, well, then, Yes: everything in the div will have that opacity.Maybe what you are after is a div that contains pics and text, and you want them "full strength," but you want the background of the div to be translucent.First, do you really want it translucent? I mean, is there something behind the div that you want to show through? Or do you just want the image to have a faded look?Either way, it's the image you want to change, not in HTML, but in your image editor. (I use Photoshop, and the place for opacity is right out front where you can't miss it.) Save the image as a PNG file. And be aware that it won't look right in IE 6.Alternatively, you could stack one div on top of another (one uses the filter, and the other doesn't) but you'll have to be very careful with absolute positioning and coordinates.If I've misunderstood, you'll have to explain yourself better or show us just enough CSS and markup so we see what's going on.

Link to post
Share on other sites
Guest FirefoxRocks

Once more browsers support CSS3, we can use the rgba() colour unit to indicate opacity along with colour so only the background is translucent. The problem will resolve itself eventually, with graceful degradation of course.As for right now, are you trying to acheive the example given in the W3Schools link in your post?

Link to post
Share on other sites

Sorry about that Deirdre's Dad, that was my first post and my first week learning html, css, and javascript."Maybe what you are after is a div that contains pics and text, and you want them "full strength," but you want the background of the div to be translucent."---exactly"If I've misunderstood, you'll have to explain yourself better or show us just enough CSS and markup so we see what's going on."--- you haven't misunderstood..."Alternatively, you could stack one div on top of another (one uses the filter, and the other doesn't) but you'll have to be very careful with absolute positioning and coordinates."--- I'll try that thanks!

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...