It is likely that the height and width dimensions may need adjustments to align with your final code requirements. However, by using this snippet, you can explore how to apply border-radius to an outer card
element and border-top-right-radius as well as border-top-left-radius to the inner card-header
element to achieve the desired visual effect.
The display: flex
property set on the card-header
element enables the utilization of justify-content: space-between
to create spacing between the title and ellipsis elements with minimal CSS rules.
I also incorporated additional styling to maintain consistency in colors, font styles, etc.
.body {
display: block;
background: #FAFAFA;
width: 1000px:
height: 1000px;
padding: 25px;
}
.card {
background: #fff;
border-radius: 5px;
width: 300px;
height: 400px;
}
.card .card-header {
display: flex;
justify-content: space-between;
color: #fff;
font-family: sans-serif;
font-size: 12px;
font-weight: bold;
letter-spacing: 0.5px;
background: #4BA2AF;
padding: 10px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
<div class="body">
<div class="card">
<div class="card-header">
<span class="title">COMMUNITY DETAILS</span>
<span class="ellipsis">…</span>
</div>
</div>
</div>