.image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px;
  list-style-type: none;
}

.image-gallery li {
  /* Adding  Will stop the images from hugging the right edge of the container*/
    flex: 1;
}

.image-gallery li img {
  max-height: 180px;
  vertical-align: middle;
  border-radius: 5px;
}