Tempatkan Pusat Item di CSS Menggunakan Grid
.parent-element {
display: grid;
place-items: center;
}
Tired Tapir
.parent-element {
display: grid;
place-items: center;
}
div {
display: inline-grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 3px;
justify-items: center;
align-items: center;
}
<div class="container">
<div class="row align-items-center vh-100">
<div class="col-6 mx-auto">
<div class="card shadow border">
<div class="card-body d-flex flex-column align-items-center">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of
the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
</div>
</div>