Grid Layout Test3

by Svitcher

HTML

<!doctype html>

<html lang="en">

  <head>
    <meta charset="utf-8">

    <title>Grid: task 3</title>

    <link rel="stylesheet" href="../styles.css">

    <style>
      body {
        background-color: #fff;
        color: #333;
        font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
        padding: 1em;
        margin: 0;
      }

      .grid > * {
        background-color: #4D7298;
        border: 2px solid #77A6B6;
        border-radius: .5em;
        color: #fff;
        padding: .5em;
      }

      .grid {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 10px;
      }
    </style>

  </head>

  <body>

    <div class="grid">
      <div class="one">One</div>
      <div class="two">Two</div>
      <div class="three">Three</div>
      <div class="four">Four</div>
    </div>

  </body>

</html>

CSS

.grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
grid-template-areas:
  "one one"
"two three"
".four";
}
.one {
grid-area: one;
}
.two {
grid-area: two;
}
.three {
grid-area: three;
}
.four {
grid-area: four;
}