Not sure what your requirements are or if you are using CSS frameworks etc., but a simple idea is a div between the image and the actions.
Position that div with position: relative;
, give it a positive z-index z-index: 2;
, a fixed height and a negative margin.
Make the div above also position: relative;
and give it a lower z-index like z-index: 0;
. Add the gradient to the in-between div and there you have it.
See snippet below:
* { margin: 0; padding: 0; }
body { padding: 10px; }
p { margin: 5px 0 8px; }
.card {
width: 100%;
max-width: 400px;
border: 1px solid #e0e0e0;
border-radius: 10px;
}
.card .content {
padding: 10px 10px 0 10px;
}
.card .map {
position: relative;
z-index: 0;
width: 80%;
max-width: 80%;
margin: 0 auto;
overflow: hidden;
}
.card .fading-gradient-bottom {
position: relative;
z-index: 2;
width: 100%;
height: 16px;
margin-top: -16px;
background: rgb(200,200,200);
background: linear-gradient(0deg, rgba(200,200,200,1) 0%, rgba(200,200,200,0) 100%);
}
.card .actions {
font-size: 40px;
text-align: center;
padding: 10px;
margin: 0 auto;
border-radius: 0 0 10px 10px;
background: rgb(200,200,200);
}
<div class="card">
<div class="content">
<h3>Title</h3>
<p>Content, like Lorem Ipsum or something</p>
</div>
<div class="map">
<img src="https://picsum.photos/seed/gradient/400/200/" alt="">
</div>
<div class="fading-gradient-bottom"></div>
<div class="actions">
✅
</div>
</div>