I have a section with 3 columns. I want to center all the content both horizontally and vertically. I have tried justify-content: center;
align-items: center;
but it didn't centered the elements vertically.
How can I do that?
#home-a .stats-count {
display: -ms-grid;
display: grid;
-ms-grid-columns: (1fr)[3];
grid-template-columns: repeat(3, 1fr);
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 100%;
text-align: center;
}
<section id="home-a" class="py-3">
<div class="container">
<div class="stats-count text-center">
<div class="stat">
<h2>24+</h2>
<p>Halal Categories</p>
</div>
<div class="stat">
<h2>2,495+</h2>
<p>Halal Places</p>
</div>
<div class="stat">
<h2>128+</h2>
<p>Regions</p>
</div>
</div>
</div>
</section>