Take a look at the edges of the image. I'm attempting to create a background with opacity without affecting the text on top of it. (I want the text to remain fully visible) However, the issue I am facing is that the sides of my image are not displaying with the intended opacity.
.container {
position: relative;
background-image: url("https://www.elephantsdeli.com/wp-content/uploads/fly-images/1673/elephants-delicatessen-sack-lunch-order-form-hero-image.jpg-1920x1080.jpg");
height: 50vh;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.background {
height: 100vh;
background: rgba(255,255,255,.4)
}
.text-center {
padding: 50px 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<div class="container">
<div class="background">
<h1 style="font-size: 350%;" class="text-center"><b>It's Lunch-Time!</b></h1>
</div>
</div>