How do you create a CSS Grid layout?

Answer

CSS Grid allows for 2D layout control (rows and columns). Use display: grid;.

.container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

CSS Grid Layout - CSS: Cascading Style Sheets | MDN CSS Grid Layout Guide