0

My Images are not all centered. They start roughly in the middle and then go off to the right and side leaving a space on the left hand side

I am trying to make all my images centered neatly. I have 3 images in a row but there is a massive gap on the left hand side so the images start roughly in the centre and go of to the right. I want the all the images to be centered correctly. Here is my html code:

.row {
  display: flex;
}
.column {
  flex: 33.33%;
  padding: 5px;
}
<div class="row">
  <div class="column">
    <img src="https://i.picsum.photos/id/1002/50/50.jpg" alt="Great Wall of China" >
  </div>
  <div class="column">
    <img src="https://i.picsum.photos/id/1002/50/50.jpg" alt="Great Wall of China">
  </div>
   <div class="column">
    <img src="https://i.picsum.photos/id/1002/50/50.jpg" alt="Great Wall of China">
  </div>
</div>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Josborne
  • 11
  • 3

1 Answers1

0
.flex-container {
        display: flex;
        /* flex-direction: row; */
        justify-content: center;
    }

    .column {
        /* flex: 33.33%; */
        padding: 5px;
    }

Make from class="row" to class="flex-container"

<div class="flex-container">
<div class="column">

</div>
<div class="column">

</div>
<div class="column">

</div>

Bazsmagister
  • 81
  • 1
  • 5