This could be a duplicate post but I can't seem to find the solution to my html/css layout, apology's in advance:
HTML CODE:
<section class="palm-section text-center" id="palm-section">
<div class="palm-img">
<h1>Palm Hotel</h1>
<div class="break-line"></div>
</div>
</section>
CSS CODE:
.palm-img h1{ /* Child text to background */
position: absolute;
top: 0;
padding-top: 10px;
font-size: 62px;
color: white;
font-weight: 400;
z-index: 1;
}
.palm-img{ /* Background */
position: relative;
width: 100%;
padding-top: 150px;
padding-bottom: 100px;
height: 100%;
background: url(/images/the-palm-962785_1280.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
color: white;
background-size: cover;
opacity: 0.5;
}
OUTPUT:
Text is being effected by the parent background's opacity
UPDATE:
Before and after CSS doesnt work, and burying the background inside another div doesnt seem to work