Use grid-row to Control Spacing- my question is why the fourth column doesnt includeddd ,only fifth only when i type 2/4 in grid-row

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;
    grid-column: 2 / 4;
    /* add your code below this line */
    grid-row: 2 / 4;
    
    /* add your code above this line */
  }
  
  .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;
  }
</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 (Linux; Android 7.1.1; XT1562 Build/NPD26.48-24-1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.123 Mobile Safari/537.36 EdgA/42.0.0.2233.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/css-grid/use-grid-row-to-control-spacing

Because you are applying it for the .class-5

1 Like

Your code is alright, that is what the challenge want you to do. Because you only edited the property of .item-5{}, so only the fifth would change, if you want the fourth to change, you need add the grid-row code inside .item4{}

1 Like

thanks for both sujith and andrew, njoyy your codinggg