CSS Grid Layouts

Tell us what’s happening:
Hi, I followed the instructions as stated yet the code still bring out error.
can someone tell me what am doing wrong.

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{
    grid-template-areas:
    /* Only change code below this line */
      "header header"
      "advert content"
      "footer footer";
    /* Only change 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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36.

Challenge: Use Media Queries to Create Responsive Layouts

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

Your code looks right to me, I think it’s just another freeCodeCamp glitch. When I went to the lesson, I also couldn’t pass the test. I looked at the solution in the help section, and the code is identical. Strangely, I was able to make the code pass by deleting the comments in the grid-template-areas section, like this.

@media (min-width: 400px){
  .container{
    grid-template-areas:
      "header header"
      "advert content"
      "footer footer";
  }
}