<div class="grid">
  <div class="box item1">Item 1</div>
  <div class="box item2">Item 2</div>
  <div class="box item3">Item 3</div>
  <div class="box item4">Item 4</div>
</div>
.grid {
  display: grid;
  grid-gap:20px;
  /* grid-template-columns: 1fr 1fr 1fr 1fr; */
  /* grid-template-rows: 400px auto 400px; */
  /* Short record (rows / column) */
  grid-template: 400px auto 400px / 1fr 1fr 1fr 1fr;
  align-items: stretch;
}

.box {
  color: #fff;
  border-radius: 5px;
  padding: 20px;
  font-size: 30px;
}

.item1 {
  background: #f00;
  align-self: end;
}
.item2 {
  background: #f0f;
  align-self: flex-start;
}
.item3 {
  background: #008000;
  align-self: end;
}
.item4 {
  background: #000;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.