Centering odd number of columns in a div
I've searched and tested over and over but nothing really works. I'm trying to center five columns inside a div. Basically, I've got a row of icons with names under each icon that I need to center. If it were 2, 3, 4, or 6 columns I wouldn't be having this issue. But with 5 it shifts all the way to the left and I can't seem to get them to center.
This is a generic html to try and display what I'm talking about. I'm trying to center the sm-2 columns in .CenterIcons. Any help or suggestions would be greatly appreciated.
<div class="container-fluid">
<div class="row">
<div class="col-xl-4"><p>This is the content for Layout P Tag</p></div>
<div class="col-xl-4"><p>This is the content for Layout P Tag</p></div>
<div class="col-xl-4"><p>This is the content for Layout P Tag</p></div>
</div>
<div class="row CenterIcons">
<div class="col-xl-2"><img src="https://findicons.com/files/icons/2141/web_design_creatives/128/small_smile.png" class="img-fluid" style="min-width: 40px;
max-width: 90px;" alt="Placeholder image">
<p>Icon name</p>
</div>
<div class="col-xl-2"><img src="https://findicons.com/files/icons/2141/web_design_creatives/128/small_smile.png" class="img-fluid" style="min-width: 40px;
max-width: 90px;" alt="Placeholder image">
<p>icon name</p>
</div>
<div class="col-xl-2"><img src="https://findicons.com/files/icons/2141/web_design_creatives/128/small_smile.png" class="img-fluid" style="min-width: 40px;
max-width: 90px;" alt="Placeholder image">
<p>icon name</p>
</div>
<div class="col-xl-2"><img src="https://findicons.com/files/icons/2141/web_design_creatives/128/small_smile.png" class="img-fluid" style="min-width: 40px;
max-width: 90px;" alt="Placeholder image">
<p>icon name</p>
</div>
<div class="col-xl-2"><img src="https://findicons.com/files/icons/2141/web_design_creatives/128/small_smile.png" class="img-fluid" style="min-width: 40px;
max-width: 90px;" alt="Placeholder image">
<p>icon name</p>
</div>
</div>
</div>
