Improving instructions for CSS Grid: Use grid-row to Control Spacing

So, I think you may want to consider being more specific on the number of rows in this challenge, and the number of columns in the last challenge. I know this works, but I was confused on which rows the object should cover.

Code:


<style>
.item1{background:LightSkyBlue;}
.item2{background:LightSalmon;}
.item3{background:PaleTurquoise;}
.item4{background:LightPink;}

.item5 {
  background: PaleGreen;
  grid-column: 2 / 4;
  /* Only change code below this line */
grid-row: 2/4;
  /* Only change 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>

Brower information:

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

Challenge: Use grid-row to Control Spacing

Link:

@JustSomeone1223 A better tag than html-css for this post would probably be contributers because that channel is specifically for things like this and updates to FreeCodeCamp.

Okay. I’ll put stuff like this there for next time. Thanks!

1 Like