CSS Grid is a powerful two-dimensional layout system for the web. It lets you design web pages using rows and columns — unlike Flexbox, which works mainly in one direction (row or column).
Grid allows you to:
display: grid Property (Core Concept).container {
display: grid;
}
grid-template-columns and grid-template-rows.container {
grid-template-columns:100px 200px 1fr;
grid-template-rows: 50px 100px;
}
grid-template-columns defines how many columns there are and their widths.grid-template-rows defines how many rows there are and their heights.px), percentages (%), fractions (fr), or auto.1fr means a fraction of leftover space.