I'm attempting to create an inline list that resembles a grid with as many cards arranged horizontally as possible. However, I've encountered a problem - when I float the list items to the left, the text centering no longer functions and the list itself becomes left-aligned.
Below is an example of the card structure being loaded into the list item using AJAX .load()
<div class="my-card" style="width: 268px;">
<a href="" class="card-text">
<img class="card-img-top" src="http://placehold.it/268x280" alt="">
<div class="card-body py-3 px-0">
<div>Dolor labore duis eu eu qui officia aliqua minim.</div>
</div>
</a>
</div>
https://i.sstatic.net/DIahO.png
<div class="container-fluid">
<div class="row">
<div class="d-flex text-center">
<ul class="list-inline">
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
<li class="list-inline-item float-left"></li>
</ul>
</div>
</div>
</div>
This follows the same pattern, but the last items are centered in the list:
https://i.sstatic.net/ThIKV.png
<div class="container-fluid">
<div class="row">
<div class="d-flex">
<ul class="list-inline text-center pl-3 justify-content-start">
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
<li class="list-inline-item"></li>
</ul>
</div>
</div>
</div>
So, my main question is how can I center the list inside d-flex while floating the list items to the left? Any assistance would be greatly appreciated.