Chilli94 Posted August 12, 2008 Share Posted August 12, 2008 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 comment Share on other sites More sharing options...
Chilli94 Posted August 12, 2008 Author Share Posted August 12, 2008 Anyone? Link to comment Share on other sites More sharing options...
jeffman Posted August 12, 2008 Share Posted August 12, 2008 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 comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 13, 2008 Share Posted August 13, 2008 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 comment Share on other sites More sharing options...
Chilli94 Posted August 13, 2008 Author Share Posted August 13, 2008 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 comment Share on other sites More sharing options...
Chilli94 Posted August 13, 2008 Author Share Posted August 13, 2008 I'm a noobWhat is the code for the filter? Link to comment Share on other sites More sharing options...
jlhaslip Posted August 14, 2008 Share Posted August 14, 2008 Another approach is to make the background image carry the opacity using photoshop or the Gimp to alter the image and then add the image to the background.http://www.jlhaslip.trap17.com/mlafever/index.html is an example of this method in action. Link to comment Share on other sites More sharing options...
SpOrTsDuDe.Reese Posted August 14, 2008 Share Posted August 14, 2008 I'm a noobWhat is the code for the filter?For MS? filter:DXImageTransform.Microsoft.Alpha(opacity=70);The syntax is f*cked up but hey, works good for MS. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.