Trying to align 3 cards in a row within an angular 10 project has been challenging. While the cards line up horizontally on mobile devices, I'm struggling to create proper spacing between them on desktop. I've attempted adjusting margins and padding manually, utilizing Bootstrap's offset variable, and experimenting with flex parameters, but none have provided the desired result.
If someone could take a look at my code and help point out where I'm going wrong, it would be greatly appreciated.
My attempts so far include:
- Manually setting margins and padding - no effect seen
- Using Bootstrap's offset variable - no changes observed
- Experimenting with flex parameter - also no impact
Card Component HTML
<section>
<div class="row">
<div class="col-xl-4 col-md-4 my-4">
...
</div>
</div>
</section>
SCSS for this component:
.cascading-admin-card {
margin-top: 20px;
float: left;
width:18rem;
}
...
.cascading-admin-card .admin-up .fa {
-webkit-box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2), 0 2px 13px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2), 0 2px 13px 0 rgba(0, 0, 0, 0.19);
}
Main dashboard implementation:
<div class="main-content justify-content-center" style="padding-top: 50px; align-content: center">
<div class="container">
<div class="row row-cols-12 row-cols-md-3">
...
</div>
</div>
</div>