Don't understand what to do?

Don't understand what to do?
0

#1

Tell us what’s happening:
how to make header and footer to occupy all width of top and bottom row?

Your code so far


<style>
  .item1 {
    background: LightSkyBlue;
    grid-area: header;
  }
  
  .item2 {
    background: LightSalmon;
    grid-area: advert;
  }
  
  .item3 {
    background: PaleTurquoise;
    grid-area: content;
  }
  
  .item4 {
    background: lightpink;
    grid-area: footer;
  }
  
  .container {
    font-size: 1.5em;
    min-height: 300px;
    width: 100%;
    background: LightGray;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50px auto 1fr auto;
    grid-gap: 10px;
    grid-template-areas:
      "header"
      "advert"
      "content"
      "footer";
  }
  
  @media (min-width: 300px){
    .container{
      grid-template-columns: auto 1fr;
      grid-template-rows: auto 1fr auto;
      grid-template-areas:
        "advert header"
        "advert content"
        "advert footer";
    }
  }
  
  @media (min-width: 400px){
    .container{
      /* change the code below this line */
    
      grid-template-areas:
        "advert header"
        "advert content"
        "advert footer";
    grid-template-rows:
    /* change the code above this line */
    }
  }
</style>
  
<div class="container">
  <div class="item1">header</div>
  <div class="item2">advert</div>
  <div class="item3">content</div>
  <div class="item4">footer</div>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/css-grid/use-media-queries-to-create-responsive-layouts


#2

Please search the forum before you post (or) wait for the Intelligent query to show the similar requests.


#3

I understand the statement but the problem is i am confusing about the “property” value…


#4

Did you checked that link and still confused?
Please be specific which part you are confused.


#5

I had same idea on my mind… I placed grid-template-columns: auto (for advert) 100%(for header) auto(content) 100%(footer) and in grid-template-areas I removed advert(.) next to header and footer… But it doesn’t work…


#6

hi , this is how it works
@media (min-width: 400px){
.container{
/* change the code below this line */

  grid-template-areas:
    "header header"
    "advert content"
    "footer footer";


/* change the code above this line */
}

}


#7

Stuck here buddies need help your help!