partner bar grid draft 3

by ordette

HTML

<section class="nav-bar">
    <div class='logo'>logo</div>
    <p class='text'>PDQ Captals works with your favorite devices: blah blah blah blah bla</p>
    <a class='brand'>brand 1</a>
    <a class='brand'>brand 2</a>
    <a class='brand'>brand 3</a>
    <a class='brand'>brand 4</a>
</section>

<section class="nav-bar nav-bar-2">
    <div class='logo'>logo</div>
    <p class='text'>PDQ Captals works with your favorite devices: blah blah blah blah bla</p>
    <a class='brand'>brand 1</a>
    <a class='brand'>brand 2</a>
    <a class='brand'>brand 3</a>
    <a class='brand'>brand 4</a>
</section>

SCSS

.nav-bar {
  display: grid;
  max-width: 1140px;
  border: 2px solid red;
  margin: 0 auto;
  gap: 1em;
  grid-template-columns: auto 240px 1fr 170px 170px 100px 100px;
  
  @media screen and (max-width: 1040px) {
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
}

.logo {
  height: 50px;
  width: 50px;
  background-color: green;
  grid-column: 1 / 2;
  @media screen and (max-width: 1040px) {
    grid-column: 1/3;
    justify-self: end;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
    justify-self: center;
  }
}

.text {
  border: 2px solid purple;
  grid-column: 2 / 3;
  @media screen and (max-width: 1040px) {
    grid-column: 3/9;
    justify-self: center;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
  }
}

.brand {
  margin: 0 auto;
  background-color: lightblue;
}

a:nth-child(3){
  width: 170px;
  background-color: orange;
  grid-column: 4 / 5;
  @media screen and (max-width: 1040px) {
    grid-column: 1/3;
    justify-self: center;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
  }
}

a:nth-child(4){
  width: 170px;
  background-color: pink;
  @media screen and (max-width: 1040px) {
    grid-column: 3/5;
    justify-self: center;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
  }
}

a:nth-child(5){
  width: 100px;
  background-color: red;
  @media screen and (max-width: 1040px) {
    grid-column: 5/7;
    justify-self: center;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
  }
}

a:nth-child(6){
  width: 100px;
  @media screen and (max-width: 1040px) {
    grid-column: 7/9;
    justify-self: center;
  }
  @media screen and (max-width: 767px) {
    grid-column: 1/9;
  }
}


.nav-bar-2 {
  margin-top: 100px;
  
  .logo {
    width: 165px;
  }
}