I have a div element with text blocks and a parent div in which I have set a background image. Now I want to reduce the opacity of the background image. Please suggest how I
You can't use transparency on background-images directly, but you can achieve this effect with something like this:
http://jsfiddle.net/m4TgL/
HTML:
//my blog post
CSS:
.container { position: relative; }
.container:before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
background-image: url('image.jpg');
opacity: 0.5;
}
.content {
position: relative;
z-index: 2;
}