Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
make div background transparent 50%, but the content should not be got transparent. I have tried many ways but not getting. Please Help me.
Posted

 
Share this answer
 
Comments
Abhinav S 6-Aug-11 1:19am    
Good link. 5.
Hey sir, this is quite easy !
If you have any image processing software like photoshop or so, make a 1 pixel dimensioned picture with the color you desire and reduce its transparency to the demanded opacity, make SURE to save it as PNG, and then make it as your div background.

if you find this hard
I can make this for you, just mention the color
 
Share this answer
 
v3
Comments
rene bologna 21-Nov-12 9:29am    
The best easy way is here

http://robertnyman.com/2010/01/11/css-background-transparency-without-affecting-child-elements-through-rgba-and-filters/

resume: create a css class
div.alpha60 {
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0) transparent;
/* RGBa with 0.6 opacity */
background: rgba(0, 0, 0, 0.6);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900