html grid layout
snippet in html

html grid layout


<!DOCTYPE html>
.grid-container {
  display: grid;
  grid-template-columns: auto auto auto auto;
  grid-gap: 10px;
  background-color: #2196F3;
  padding: 10px;

.grid-container > div {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid black;
  text-align: center;
  font-size: 30px;

<h1>Grid Container</h1>

<p>A Grid Container consists of grid items arranged in columns and rows</p>

<div class="grid-container">

<p>Direct child elements(s) of the grid container automatically becomes grid items.</p>


css grid


.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";

display grid


.container {
  display: grid | inline-grid;

grid css


grid-row-start:    2;
grid-row-end:      3;
grid-column-start: 2;
grid-column-end:   3;

css display grid


/* 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;