Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1307

Bootstrap, align items center, but not the last row, if don't have enough item [duplicate]

$
0
0

I have a row with wrap enabled, and items with fixed width. I don't want to stretch out the last item! The problem is, that if every row has 3 item, and the last row have only 1, then that one item is centered fully, but I want to align to the left.

image about the problem

This is the code now:

<div class="container full-extended-width"><div class="row justify-content-center">            @foreach ($brand->getProductCategories as $productCategory)                @if ($productCategory->parent_id == null)<div class="item-container"><img src="/product_category_logos/{{ $productCategory->id }}.png"><br><div class="title">{{ mb_strtoupper($productCategory->name) }}</div></div>                @endif            @endforeach</div></div>

Thank you for any help!


Viewing all articles
Browse latest Browse all 1307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>