0

I am using justify-content: space-around; to align images in a row on my simple gallery app. The issue I am having is that no matter what I use (whether it is space-around, stretch or center) The images are not centered correctly (see images below). I have deleted the bootstrap dependency I had in my package.json as I thought that might be causing the issue and I wasn't actually using bootstrap anywhere in my app. As you can see in the image, the gap on the far left is larger than the gap on the far right.

enter image description here

HTML:

<ul>
    <li class="item-list-container"><app-image-item
    *ngFor="let imageEl of images"
    [image]="imageEl"
    ></app-image-item>
    </li>
</ul>

CSS:

   li {
        list-style: none;
    }

    .item-list-container {
        display: flex;
        justify-content: space-around; 
        align-items: center;
        width: 100%;
    }
JohnDev
  • 71
  • 8

0 Answers0