ziben69
1 week ago
120
6
Laravel

Foreach | Holes in bootstrap grid

Posted 1 week ago by ziben69

Hello guys, I have loop with photos of gallery:

@foreach($gallery->chunk(2) as $chunk)
	<div class="row">
	@foreach($chunk as $gall)
	@foreach($gall->photos as $photo)
	@if(!is_null($photo))
		<div class="col-lg-4 col-md-4 col-sm-6">
			<div class="portfolio-des">
				<a href="/meritum/storage/app/{{ $photo->filename }}" data-lightbox-gallery="portfolio-gallery"><img src="/meritum/storage/app/{{ $photo->filename }}" alt="portfolio img"></a>
			</div>
		</div>
	@endif
	@endforeach
	@endforeach
	</div>
@endforeach

first 2 rows (6 photos) looks good, but next one have one empty column, how can I reduce this space?

Thanks

Please sign in or create an account to participate in this conversation.