I can't find solution for this (When the viewport is 400px or more, container class should have a grid-template-areas property in which the header and footer areas occupy the top and bottom rows respectively and advert and content occupy the left and rig)

Tell us what’s happening:

Your code so far

.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;

@media (min-width: 300px){
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
      "advert header"
      "advert content"
      "advert footer";

@media (min-width: 400px){
    /* change the code below this line */

      "advert content"

  /* change the code above this line */

<div class="container">
<div class="item1">header</div>
<div class="item2">advert</div>
<div class="item3">content</div>
<div class="item4">footer</div>

Your browser information:

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

Challenge: Use Media Queries to Create Responsive Layouts

Link to the challenge:

You didn’t tell us what problems you’re experiencing or questions you have.

1 Like

sorry ,
but now i fixed my question

the first line has one column, the second row has two columns and the third row again only one column?

each row needs to still have the same number of columns

1 Like

please don’t make titles so long
that paragraph was what you could have put in your post under the “Tell us what’s happening” header