I’m intending to make this voucher card/coupon like section in my Laravel project.
Does anyone know genuinely how to create this? I’ve tried many ways, but it came off futile. Particularly the white curvy thingy on the right.
(I had to cover the assets since I’m afraid my coworker will come across this problem…) putting that aside I hope someone will give me a solution, thank you!
What I’ve tried
blade:
<div class="container mt-5">
<div class="promo-card">
<div class="row g-0">
<div class="col-md-4 col-lg-1 bg-best-deal d-flex align-items-center justify-content-center">
<p class="best-deal-text">Text</p>
</div>
<div class="col-md-8 col-lg-9">
<div class="card-body d-flex align-items-center">
<div class="row w-100">
<div class="col-lg-7 position-relative">
<img src="{{ asset('assets/img.png') }}" class="img-fluid" alt="Promo Image">
</div>
<div class="col-lg-5 d-flex align-items-center">
<div class="container-fluid">
<!-- Text and promo code goes here-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
css:
.promo-card {
border: 4px solid transparent;
border-radius: 24px;
background: linear-gradient(white, white) padding-box, linear-gradient(90deg, #F5C020 -26.92%, #FFE598 100%) border-box;
overflow: hidden;
background-color: #ffffff;
border-radius: 24px;
box-shadow: 0px 19.66px 132.3px 0px rgba(251, 214, 104, 0.5);
}
.best-deal-text {
color: #1B5458;
writing-mode: vertical-rl;
font-weight: 570;
font-size: 2.5rem;
}
.bg-best-deal {
background: linear-gradient(90deg, #F5C020 -26.92%, #FFE598 100%);
}
.image-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 40px;
overflow: hidden;
}
.image-overlay svg {
height: 100%;
width: 40px;
position: absolute;
right: 0;
}