How can I order image horizontally?

74 views Asked by At

images order vertically, I want to display horizontally one row.I use fancybox3 and boostrap4

this is my code

<?php
$sayfa = 'Ürünler';
include('inc/vt.php');
include('inc/head.php');
include('inc/nav.php');

$sorgu = $baglanti->prepare("SELECT * FROM urunler where aktif=1 order by sira");
$sorgu->execute();
$yon = 'sag';

while ($sonuc = $sorgu->fetch()) {
?>

<section class="imglist">
<a href="img/<?= $sonuc['foto'] ?>" data-fancybox data-caption="This image has a caption">
  <img src="img/<?= $sonuc['foto'] ?>" style='height: 50%; width: 100%; object-fit: contain;display: 
block;margin: auto auto' />
 </a>
</div>

<?php
if ($yon == 'sag') $yon = 'sol';
else $yon = 'sag';

} //while end
include('inc/footer.php');
?>
1

There are 1 answers

0
MCA On BEST ANSWER

I am on mobile so please excuse grammar/formatting.

Change your display attribute to:

display: inline-block;

and LMK if that fixes it.