Check out example codes for "css display grid". It will help you in understanding the concepts better.

Code Example 1

<!DOCTYPE html>
.grid-container {
  display: grid;
  grid-template-columns: auto auto auto;
  background-color: #2196F3;
  padding: 10px;
.grid-item {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.8);
  padding: 20px;
  font-size: 30px;
  text-align: center;

  <div class="grid-container">
    <div class="grid-item">1</div>
    <div class="grid-item">2</div>
    <div class="grid-item">3</div>  
    <div class="grid-item">4</div>
    <div class="grid-item">5</div>
    <div class="grid-item">6</div>  
    <div class="grid-item">7</div>
    <div class="grid-item">8</div>
    <div class="grid-item">9</div>  


Code Example 2

.container {
  display: grid | inline-grid;

Code Example 3

.item1 { grid-area: header; }
.item2 { grid-area: 
  menu; }
.item3 { grid-area: 
  main; }
.item4 { grid-area: 
  right; }
.item5 { grid-area: 
  footer; }

.grid-container {
  display: grid;
  'header header header header header header'
  'menu main main main right right'
    'menu footer footer 
  footer footer';

Code Example 4

.item-a {
  grid-area: header;
.item-b {
  grid-area: main;
.item-c {
  grid-area: sidebar;
.item-d {
  grid-area: footer;

.container {
  display: grid;
  grid-template-columns: 50px 50px 50px 50px;
  grid-template-rows: auto;
    "header header header header"
    "main main . sidebar"
    "footer footer footer footer";

Code Example 5

/* Answer to: "css display grid" */

  The CSS Grid Layout Module offers a grid-based layout system,
  with rows and columns, making it easier to design web pages
  without having to use floats and positioning.

  An HTML element becomes a grid container when its display property
  is set to grid or inline-grid.

  For more information, go to:

.grid-container {
  display: grid;

/* or */

.grid-container {
  display: inline-grid;

Learn ReactJs, React Native from