I would like to put 5 columns next to each other in a .row div.
If i delete the col-sm-6 col-md-3
classes from the divs, and just give a simple .col
class, nothing happens also.
I show you a photo of my source code.
If i put a .clearfix
div after every 5. col div, why doesnt it works?
echo '<div class="row">';
$otodik = "";
include_once("files/show_products.php");
echo '</div>';
In a while loop:
<?php while($item = mysqli_fetch_assoc($get_items)){ if($otodik%5 == 0) { echo '<div class="clearfix"></div>'; } ?>
<div class="col-sm-6 col-md-3 text-center mb-5">
<a href="<?php echo $host; ?>/webshop/<?php echo $seolink_kat ."/". html($item['termek_seo']); ?>" class="" title="<?php echo html($item['termek_nev']); ?>">
<img data-src="https://gras.hu/images/item/<?php echo html($item['termek_thumb']).t2(); ?>" alt="<?php echo html($item['termek_nev']); ?>" class="img-fluid main_product_thumb lazyload">
</a>
<h2 class="main_item_title">
<a href="<?php echo $host; ?>/webshop/<?php echo $seolink_kat ."/". html($item['termek_seo']); ?>" class="" title="<?php echo html($item['termek_nev']); ?>"><?php echo html($item['termek_nev']); ?></a>
</h2>
</div>
<?php $otodik++; } ?>
<div class="clearfix"></div>