Attempting to replicate a specific design using HTML/CSS has been a challenge.
I've been struggling to position an image on top of the two divs.
I would greatly appreciate any assistance with the design.
Here is what I have tried so far:
The following code is for a Blazor Component, hence the presence of variables:
.row-centered-elements {
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
min-height: 50vh;
background-color: #f4f4f4;
}
.card {
width: 300px;
height: 400px;
background-color: #fff;
border-radius: 18px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin: 10px;
}
.image-container {
position: relative;
overflow: hidden;
border-top-left-radius: 18px;
border-top-right-radius: 18px;
}
.image {
width: 100%;
height: 150px;
object-fit: cover;
}
.divider {
display: flex;
justify-content: center;
align-items: center;
background-color: #f4f4f4;
}
.divider img {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #fff;
padding: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.text {
padding: 20px;
text-align: center;
font-family: Graphik, Arial, sans-serif;
}
.title {
font-family: GraphikSemibold, Arial, sans-serif;
}
<div class="row-centered-elements" <div class="card">
<div class="image-container">
<img class="image" src=@imgBackCard1 alt="Image">
</div>
<div class="divider">
<img src=@imgCircCard1 alt="Divider Image">
</div>
<div class="text">
<h2 class="title">@Title1</h2>
<p>@ParagraphCard1</p>
</div>
</div>
<div class="card">
<div class="image-container">
<img class="image" src=@imgBackCard2 alt="Image">
</div>
<div class="divider">
<img src=@imgCircCard2 alt="Divider Image">
</div>
<div class="text">
<h2 class="title">@Title1</h2>
<p>@ParagraphCard2</p>
</div>
</div>
</div>