I am using CSS attrubutes :
filter: alpha(opacity=90);opacity: .9;
to make the DIV transparent, but when I add another DIV inside this DIV it makes it transparent also.
I want to make the outer(background) DIV only transparent. How ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Fiddle: http://jsfiddle.net/uenrX/1/
The opacity property of the outer DIV cannot be undone by the inner DIV. If you want to achieve transparency, use
rgbaorhsla:Outer div:
Inner div:
EDIT
Because you’ve added
filter:alpha(opacity=90)to your question, I assume that you also want a working solution for (older versions of) IE. This should work (-ms-prefix for the newest versions of IE):I’ve used the Gradient filter, starting with the same
start-andend-color, so that the background doesn’t show a gradient, but a flat colour. The colour format is in the ARGB hex format. I’ve written a JavaScript snippet to convert relative opacity values to absolute alpha-hex values: