I want to place a filter on an image that I will put in the background by applying background-image:url(url..);
to div
but I have a problem, the filter is also taking the content that is inside the box and I just want to apply the filter to the image and that the content, whether text or inputs go without it.
To place the filter just take a <div id="container-fluid-slider>
and the id
that you put that div
apply the filter filter:brightness(0.5);
but as I said before I'm taking the content within it.
#container-fluid-slider {
background-image: url(http://www.gelfuzion.com/img/slides/nivo/bg-1.jpg);
height: 70vh;
width: 100%;
font-family: 'Fredoka One', cursive;
position: relative;
filter: brightness(0.5);
}
#container-fluid-slider p {
font-family: 'Barlow', sans-serif;
font-weight: 600;
}
#form-slider input {
width: 80%;
height: 50px;
border-radius: 5px;
border: none;
}
#form-slider button {
width: 30%;
height: 50px;
border-radius: 5px;
border: none;
color: #FFF;
background: #268ab9;
font-size: 20px;
transition: 0.5s;
}
<div
class="container-fluid d-lg-flex justify-content-center align-items-center"
id="container-fluid-slider">
<div class="row">
<div class="col-12 d-lg-flex flex-lg-column " id="col-12-slider">
<h1 class="text-center">Find Sudan's places number</h1>
<p class="text-center">Find important numbers such as Hospitals! Pharmacies! Companies etc!</p>
<div class="line d-lg-flex flex-lg-row" id="form-slider">
<input type="text" name="" value="" placeholder="Search Number">
<button class="d-inline ml-3"><i class="fas fa-search text-white pr-3"></i>Search</button>
</div>
</div>
</div>
</div>