The issue I'm encountering is when I add four images to the .images
container the justify-content:center
property which I am applying to center up the images horizontally on page does not work.
However when I only have two images inside the .images
container I get the images horizontally centered.
I've been able to find a solution to centering the images up horizontally by using the text-align
property on the .images
container. This feels slightly like a hack though.
HTML
<div class="proj_images">
<div class="images">
<img class="disp1" src="http://placehold.it/450x350.png" alt="">
<img class="disp2" src="http://placehold.it/450x350.png" alt="">
<img class="disp3" src="http://placehold.it/450x350.png" alt="">
<img class="disp4" src="http://placehold.it/450x350.png" alt="">
</div>
</div>
CSS
.proj_images{
display: flex;
width:100%;
}
.images{
text-align:center;
}