0

I know this question has been asked many times but no solutions worked for me. I tried this solution but it didn't worked for me and just aligned the images on the left of the page.

Code:

head
    link(rel="stylesheet", href="/public/styles/bootstrap.css")
block intro
    .container
        h1(class="text-center") L'équipe
        div(id="images")
            img(alt="aleis", src="/images/team/alexis.jpg", width="160", class="fblogo")
            img(alt="laurent" src="/images/team/laurent.jpg", width="160", class="fblogo")
            img(alt="clement" src="/images/team/clement.jpg", width="160", class="fblogo")
            img(alt="loic" src="/images/team/loic.jpg", width="160", class="fblogo")
Community
  • 1
  • 1
baldash
  • 307
  • 5
  • 17

2 Answers2

0

That should do the job:

img{
  width: 300px;
  margin: 5px;
}
#images {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-around;
}
<div id="images">
  <img src="https://hd.unsplash.com/photo-1415045550139-59b6fafc832f" alt="">
  <img src="https://hd.unsplash.com/photo-1415045550139-59b6fafc832f" alt="">
  <img src="https://hd.unsplash.com/photo-1415045550139-59b6fafc832f" alt="">
  <img src="https://hd.unsplash.com/photo-1415045550139-59b6fafc832f" alt="">
  <img src="https://hd.unsplash.com/photo-1415045550139-59b6fafc832f" alt="">
</div>
Aaron Mahlke
  • 337
  • 1
  • 8
0

I just fixed by using the "center" tag which I didn't know

Code :

head
    link(rel="stylesheet", href="/public/styles/bootstrap.css")
block intro
    .container
        h1(class="text-center") L'équipe
        div(id="images")
            center
                img(alt="aleis", src="/images/team/alexis.jpg", width="160")
                img(alt="laurent" src="/images/team/laurent.jpg", width="160")
                img(alt="clement" src="/images/team/clement.jpg", width="160")
                img(alt="loic" src="/images/team/loic.jpg", width="160")
baldash
  • 307
  • 5
  • 17