Trying to space out 3 images with space around or space between depending on what I like. For some reason, the images stay stuck together in the center instead of justify-content-around. I tried taking and changing the img width thinking that maybe you couldn’t justify a img-fluid.
<div class="container">
<div class="d-flex flex-row justify-content-end my-5">
<div class="border border-2 px-2">
<img class="img-fluid px-4" src="girl.jpg" alt="">
</div>
<div class="border border-2 px-2">
<img class="img-fluid px-4" src="girl.jpg" alt="">
</div>
<div class="border border-2 px-2">
<img class="img-fluid px-4" src="girl.jpg" alt="">
</div>
</div>
</div>
2
Answers
You need to use
justify-content-between
to add space between the images. If the images size is big and space doesn’t appear then try to adjustwidth
andheight
of each image. Also try to use Bootstrap classgap
i.e.,gap-3
.Read more about
Flex
here.