Grid area in CSS grid

Grid area in CSS grid



any idea why cell number 4 disappeared when i try to place it in the footer?

also, why cell number 5 takes the entire width?

  .item4{background:LightPink; grid-area: footer;}
  .item5 {
    background: PaleGreen;
    /* add your code below this line */
    grid-area: footer;
  .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;
      "header header header"
      "advert content content"
      "footer footer footer";
<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>


Hey Tomer,
Can you post the challenge link?


hey @aditya_p

try to place the grid-area on item 4


You need to remove grid area from item-4 and you should be good to go.
Hope it helps.


hey @aditya_p

that was my purpose , to place item4 in the footer


The item4 is under the item5 because both are in the footer right now


hey @Michael55555

why they don’t share the space? each take the entire row space instead of just on cell in the footer


You cannot give same grid:area property to two elements.


@tomer-n, aditya_p is right


thanks man, that’s the thing