Grid
Grid
A grid layout consists of a parent element (the grid container), with one or more
child elements.
All direct children of the grid container automatically become grid items.
An HTML element becomes a grid container when its display property is set
to grid or inline-grid
Grid Rows:- The horizontal lines of grid items are called rows.
Grid Columns:- The vertical lines of grid items are called columns.
Grid gaps:- The spaces between each column/row are called gaps.
You can adjust the gap size by using one of the following properties:
column-gap
row-gap
gap
The column-gap property specifies the gap between the columns in a grid.
The row-gap property specifies the gap between the rows in a grid.
The gap property is a shorthand property for row-gap and column-gap.
grid-template-rows:- It decides number of rows and their size.
grid-template-columns:- It decides number of columns and their size.
grid-column-start and grid-column-end:- These properties are used merge 2
or more columns.
grid-row-start and grid-row-end:- These properties are used merge 2 or more
rows.