Divide the Grid Into an Area Template

Tell us what’s happening:

Your code so far


<style>
  .item1{background:LightSkyBlue;}
  .item2{background:LightSalmon;}
  .item3{background:PaleTurquoise;}
  .item4{background:LightPink;}
  .item5{background:PaleGreen;}
  
  .container {
    font-size: 40px;
    min-height: 300px;
    width: 100%;
    background: LightGray;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-gap: 10px;
    /* change code below this line */
    
    grid-template-areas:
      "header header header"
      "(.) (.) (.)"
      "footer footer footer";
    /* change code above this line */
  }
</style>
  
<div class="container">
  <div class="item1">1</div>
  <div class="item2">2</div>
  <div class="item3">3</div>
  <div class="item4">4</div>
  <div class="item5">5</div>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/css-grid/divide-the-grid-into-an-area-template

2 Likes

Look twice at the preview example :stuck_out_tongue:
About the syntax, you can use . without parentheses^^

3 Likes

I struggled a bit with this one too.
Since you need to hide advert, only that one needs to be replaced with a dot:

grid-template-areas:
“header header header”
“. content content”
“footer footer footer”;

8 Likes

Thanks Mickey0001. I was stuck on this one also.

1 Like

was just tried your suggestion, yea it worked. thanks

1 Like

also stuck on this challenge

The correct answer is not working with comment lines.

It’s bug, I guess.

If you remove comment lines, you can pass; just like below.

  .container {
    font-size: 40px;
    min-height: 300px;
    width: 100%;
    background: LightGray;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-gap: 10px;
    grid-template-areas:
    "header header header"
    ". content content"
    "footer footer footer";
  }