Can transparent gradients be placed above the top and bottom of the background image? At the moment, I can only find that this is being done on one or another.
UPDATE:
I tried putting 2 in the area where the background image is used, then I used two classes (one, on the contrary, to try to create the desired effect, but it didn’t work out quite well. I also liked if it is possible if it did not affect any other content and it is positioned in the section in which it is applied.
CSS
.picture-gradient {
z-index: 1;
height: 50px;
width: auto;
position: relative;
background: -webkit-linear-gradient(rgba(64,64,64,1), rgba(64,64,64,0));
background: -o-linear-gradient(rgba(64,64,64,1), rgba(64,64,64,0));
background: -moz-linear-gradient(rgba(64,64,64,1), rgba(64,64,64,0));
background: linear-gradient(rgba(64,64,64,1), rgba(64,64,64,0));
padding: 15px;
margin: -15px;
}
.picture-gradient2 {
z-index: 1;
height: 50px;
width: auto;
position: relative;
background: -webkit-linear-gradient(rgba(64,64,64,0), rgba(64,64,64,1));
background: -o-linear-gradient(rgba(64,64,64,0), rgba(64,64,64,1));
background: -moz-linear-gradient(rgba(64,64,64,0), rgba(64,64,64,1));
background: linear-gradient(rgba(64,64,64,0), rgba(64,64,64,1));
padding: 15px;
margin: -15px;
}
HTML (Basic)
<div id="photo-place-holder">
<div class="picture-gradient2"></div>
enter code here
<div>
<p>Text</p>
<p>More Text</p>
</div>
<div id="search-bar2">
<form class="form-wrapper2 searchbar2">
<table id="search-table" cellpadding="0" cellspacing="0">
<tr>
<td><input type="text" placeholder="Search for activities and places" required /></td>
<td><button type="submit"><img src="Logos/search_white_48px.png" height="28px" width="28px" /></button></td>
</tr>
</table>
</form>
</div>
<div id="search-categories"></div>
<div id="photo-details"></div>
<div class="picture-gradient2"></div>
</div>