With my div tag and div id="wrapper", I have set the wrapper's width to 960px and wanted to have that semi-transparent so the body background shows through. I also have another div with text inside the wrapper and I want to set that text as 0 opacity so the text doesn't become semi-transparent when the div is set.
At first I tried setting the
#wrapper{ opacity: .5;}
but that didn't work, so I set the
background-color: rgba(0,100,0,.5);
and that did the trick. The text is not transparent but the wrapper is.
My question is: Is this the best practice or what is the most common and easiest way to achieve this type of design?