

i am not able find exact issue is. on mobile display it did display fine. I tried manipulating isotope configuration but it did not worked out. i tried manipulating server side code . but i did not find any issue is.
else {
$ks = 0;
$getAllImagesByCategoryId = $user->getAllImagesByCategoryId($getImageCategoryDetailById['id']);
while ($getAllImagesNVideosRow = $user->fetch($getAllImagesByCategoryId)) {
$file_name = str_replace('', '-', strtolower(pathinfo($getAllImagesNVideosRow['image_name'], PATHINFO_FILENAME)));
$ext = pathinfo($getAllImagesNVideosRow['image_name'], PATHINFO_EXTENSION);
?>
<div class="grid-item col-sm-3 grid-item--height2 gallery-image" data-category="photo-galleryimage" <?php if ($ks % 4 == 0) ?>>
<a class="popup-image" data-fancybox="images" data-caption="<?php echo $getAllImagesNVideosRow['description']; ?>" href="<?php echo BASE_URL; ?>/images/gallery/<?php echo $file_name . '_large.' . $ext; ?>" data-rel="lightcase:photoGallery">
<img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-title="<?php echo $getAllImagesNVideosRow['description']; ?>" data-src="<?php echo BASE_URL; ?>/images/gallery/<?php echo $file_name . '_crop.' . $ext; ?>" alt="<?php echo $getAllImagesNVideosRow['events_title']; ?>">
</a>
<div class="item-content">
<h3><?php echo $getAllImagesNVideosRow['events_title']; ?></h3>
<span> <?php echo date("d-M-Y", strtotime($getAllImagesNVideosRow['created'])); ?></span>
</div>
</div>
<?php
}
?>
<?php
}
?>
i tried changing isotope configuration. but still did not worked. cannot find exact the issue is
Try wrapping your PHP script in a div with a class attribute of .row, like so: