Spanning Columns in CSS Grids

Similarly, you can span columns using the grid-column property.

Let's say we have a grid with four elements. Now let's make the first, second, and third elements appear in the first row. And the fourth element takes up the entire second row:

html<div id="parent">
  <div id="elem1">1</div>
  <div id="elem2">2</div>
  <div id="elem3">3</div>
  <div id="elem4">4</div>
</div>
css#parent {
  display: grid;
  padding: 10px;
  border: 2px solid #696989;
  width: 400px;
  height: 300px;
}
#parent > div {
  padding: 10px;
  border: 1px solid #696989;
}
#elem1 {
  grid-column: 1 / 2;
}
#elem2 {
  grid-column: 2 / 3;
}
#elem3 {
  grid-column: 3 / 4;
}
#elem4 {
  grid-column: 1 / 4;
}

Результат:

Задание 1

Place all the elements and merge the columns according to the following example:

Задание 2

Place all the elements and merge the columns according to the following example:

Задание 3

Place all the elements and merge the columns according to the following example: