When viewing on mobile, the cards aren't centering properly.
I've attempted to use d-flex and justify-content-center as recommended in a previous response without success.
I've observed that by adding mx-auto to each card class it somewhat centers them nicely but also eliminates the spacing between the cards.
You can visit my website here.
Everything looks good in desktop view, but once switched to mobile view, all the cards shift to the right. It seems that the cards are extending beyond the margin-right defined in my main tag.
Here is the HTML code:
<!DOCTYPE html>
<html lang="en">
<body>
<main>
<!--Cards-->
<div class="card-deck mx-auto">
<!--Games Card-->
<div class="card text-center text-white bg-dark mb-3 d-flex" style="width: 18rem;">
<a href="#">
<img src="../img/games.png" class="card-img-top" alt="Games">
<div class="card-body">
<p class="card-text"><strong>Games</strong></p>
</div>
</a>
</div>
<!-- Consoles Card-->
<div class="card text-center text-white bg-dark mb-3" style="width: 18rem;">
<a href="##">
<img src="../img/consoles.png" href="#" class="card-img-top" alt="Consoles">
<div class="card-body">
<p class="card-text"><strong>Consoles</strong></p>
</div>
</a>
</div>
<!-- Getting Started Card-->
<div class="card text-center text-white bg-dark mb-3" style="width: 18rem;">
<a href="###">
<img src="../img/gettingStarted.png" href="#" class="card-img-top" alt="Getting Started">
<div class="card-body">
<p class="card-text"><strong>Getting Started</strong></p>
</div>
</a>
</div>
</div>
</main>
<!--JavaScript-->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
I am using Bootstrap 4, any assistance would be greatly appreciated!