# build-complex-layouts-with-css-grid-layout
<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.2/normalize.min.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div class="grid grid--level-1">
      <div class="grid-item">1</div>
      <div class="grid-item">2</div>
      <div class="grid-item">3</div>
      <div class="grid grid--level-2">
        <div class="grid-item">i</div>
        <div class="grid-item">ii</div>
        <div class="grid-item">iii</div>
        <div class="grid-item">iv</div>
        <div class="grid-item">v</div>
        <div class="grid-item">vi</div>
      </div>
      <div class="grid-item">5</div>
      <div class="grid-item">6</div>
    </div>
  </body>
</html>
.grid {
  display: grid;
  grid-gap: 20px;
  font-size: 40px;
  grid-template-columns: repeat(auto-fill, minmax(200px, auto));
}

.grid--level-1 {
  height: 100vh;
}

.grid--level-2 {
  grid-gap: 15px;
  grid-template-columns: repeat(3, auto);
}

.grid--level-1 > .grid-item {
  background-color: dodgerblue;
}

.grid--level-2 > .grid-item {
  background-color: mediumspringgreen;
}