trying to make a grid with photos but doesnt work

I amm trying to make a grid with 3 columns and 3 lines (3×3) but it just doesn’t want to work.

I have already tried to set width, display grid, inline-grid copy code from other websites and nothing works. also don’t want to lose the quality of the images but the images are all different sizes, if I make a linear grid the images will look different in sizes?

body {
  background-color: #45a29e;
  margin: 0;
  padding: 0;
}

section {
  max-width: 1660px;
  margin: 0 auto !important;
  float: none !important;
}

.head {
  background-color: #137B77;
  margin: 0;
  padding: 0;
  align-items: center;
  display: flex;
  max-height: 100px;
}

.main-item {
  flex-grow: 1;
}

.left-item ul li {
  list-style: none;
  margin-left: 10px;
  color: #000000;
}

.left-item ul li a {
  color: #000000;
  text-decoration: none;
  padding-left: 30px;
  font-size: 15px;
  line-height: 2.0;
  font-family: 'STIX Two Math', serif;
}

.logo-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.logo-image img {
  position: relative;
  right: 75px;
  width: 220px;
  height: 220px;
}

.right-item {
  display: flex;
  align-items: center;
  padding-right: 230px;
}

.right-item li {
  list-style: none;
  display: inline-block;
  border-radius: 50%;
  padding-right: 10px;
}

.right-item+.left.item {
  margin-left: 2%;
}

.name-logo {
  font-family: 'STIX Two Math', serif;
  font-size: 25px;
}

.about {
  max-width: 600px;
  padding: 200px 0px 0px 0px;
  clear: right;
  display: block;
  float: left;
  margin-left: 143px;
  background-image: ;
}

section p {
  padding-top: 30px;
  font-size: 20px;
}

section img {
  display: block;
  width: 600px;
  height: auto;
  margin-left: 0;
  padding: 60px 0px 0px 144px;
}

h2 {
  overflow: hidden;
  text-align: center;
  max-width: 1440px;
  margin: 0 auto !important;
  float: none !important;
  padding-top: 80px;
}

h2:before,
h2:after {
  background-color: #000;
  content: "";
  display: inline-block;
  height: 1px;
  position: relative;
  vertical-align: middle;
  width: 50%;
}

h2:before {
  right: 0.5em;
  margin-left: -50%;
}

h2:after {
  left: 0.5em;
  margin-right: -50%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;
}


/* Create four equal columns that sits next to each other */

.column {
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 500px;
}


/* Responsive layout - makes a two column-layout instead of four columns */

@media screen and (max-width: 800px) {
  .column {
    flex: 50%;
    max-width: 50%;
  }
}


/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */

@media screen and (max-width: 600px) {
  .column {
    flex: 100%;
    max-width: 100%;
  }
}
<div class="wrapper">
  <header class="head">
    <div class="left-item">
      <ul>
        <li>
          <a href="">Home</a>
          <a href="">Portfólio</a>
          <a href="">Contato</a>
          <a href="">Localização</a>
        </li>
      </ul>
    </div>
    <div class="main-item">
      <div class="logo-image">
        <img src="photos/Logo.png.png" alt="Makeup" class="center">
      </div>
    </div>
    <div class="right-item">
      <ul>
        <li><i class="fa fa-facebook-square"></i></li>
        <li><i class="fa fa-instagram"></i></li>
        <li><i class="fa fa-twitter"></i></li>
        <li><i class="far fa-envelope"></i></li>
      </ul>
    </div>
  </header>
  
  <section>
    <div class="about">
      <div class="name-logo">
        <h1>Heloisa Antoniely</h1>
      </div>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quorum altera prosunt, nocent altera. Non est igitur voluptas bonum. Primum divisit ineleganter; Ad eos igitur converte te, quaeso. Iam contemni non poteris. Duo Reges: constructio interrete.
        Ille enim occurrentia nescio quae comminiscebatur. Quorum altera prosunt, nocent altera. Non est igitur voluptas bonum. Primum divisit ineleganter; Ad eos igitur converte te, quaeso. Iam contemni non poteris. Duo Reges: constructio interrete.
        Ille enim occurrentia nescio quae comminiscebatur</p>
    </div>
    <div>
      <img src="photos/225603489_183027393741897_5044107572736704062_n.jpg">
    </div>
    <div>
      <h2>Portfólio</h2>
      <div class="column">
        <div><img src="photos/port/photo-1.jpg"></div>
        <div><img src="photos/port/photo-6.jpg"></div>
        <div><img src="photos/port/photo-8.jpg"></div>
        <div><img src="photos/port/photo-9.jpg"></div>
        <div><img src="photos/port/photo-2.jpg"></div>
        <div><img src="photos/port/photo-3.jpg"></div>
        <div><img src="photos/port/photo-4.jpg"></div>
        <div><img src="photos/port/photo-5.jpg"></div>
        <div><img src="photos/port/photo-7.jpg"></div>
      </div>
    </div>
  </section>
</div>

Leave a Comment