Build Small Out

by ordette

HTML

<section class="nav-bar">
<div class='logo-text-container'>
    <div class='logo'>logo</div>
    <p class='text'>PDQ Captals works with your favorite devices: blah blah blah blah bla</p>
</div>

    <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

/// max 1040 > min 767
/// max 767 > default
/// default > min 1040


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

}

.logo-text-container {
  grid-column: 1/9;
   @media screen and (min-width: 767px) {
    grid-column: 1/9;
    justify-self: end;
  }
  @media screen and (min-width: 1040px) {
    grid-column: 1/3;
  }
}

.logo {
  height: 50px;
  width: 50px;
  margin-top: 20px;
  background-color: green;
  justify-self: center;
  display: inline-block;
    
}

.text {
  border: 2px solid purple;
  grid-column: 1/9;
  max-width: 100px;
  justify-self: center;
  display: inline-block;
}

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

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

  
}

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

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

  @media screen and (min-width: 1040px) {
    grid-column: 6 / 7;
  }
}

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


.nav-bar-2 {
  margin-top:...