CSS grid part 5, nested grids

Grids can be nested in other grids.Simply apply a class to the container element of a nested set of elements and set the container to display: grid.

<html>
<head>
</head>
<body>

<h1>Nested grid</h1>

<div id="wrapper">
  <div>1</div>
  <div class="nested">
    <div>
      n1
    </div>
    <div>
      n2
    </div>
    <div>
      n3
    </div>
    <div>
      n4
    </div>
   </div>
   <div>3</div>  
   <div>4</div>
   <div>5</div>
   <div>6</div>
 </div>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *