I'm trying to put some content into a contentbar which has a opacity of 0.6. I don't want the content ( text, videos, etc) to have the same opacity as the contentbar. I tried putting them into two different div tags with one of them inside the other one but when I do so the text will not be on top of the contentbar.
Hopefully I explained well enough.
.content {
color: #ffffff;
position: relative;
z-index:1;
}
.bg {
width: 80%
opacity: .6;
background-color: #000000;
margin-left: 10%;
margin-right: 10%;
border-radius: 3px;
overflow: hidden;
}
<div class="content">
<p>Hello World!</p>
<div class="bg">
<h1>Hello world!</h1>
</div>
</div>