CSS Grid
CSS Grid
Introduction
A grid can be defined with rows and columns. You can choose how to size these row and column
tracks or they can react to the size of the content.
Direct children of the grid container will be automatically placed onto this grid.
Or, you can place the items in the precise location that you want.
Lines and areas on the grid can be named to make placement easier.
Spare space in the grid container can be distributed between the tracks.
Grid items can be aligned within their area.
Grid terminology
Grid Lines
Grid Track
Grid Cell
Grid Area
Grid Gap
Gutters are the spaces between the columns. Gutters help to separate the content.
Grid Container
A grid container can be created by setting the display property with a value of grid or inline-grid.
All direct children of grid containers become grid items.
A grid container's properties specify how browsers should layout items within the grid box
model.
Inline Grid
Explicit Grid
• start
• center
• end
• stretch
• space-between
• space-around
• space-evenly
Justify-content:Start
justify-content: end;
justify-content: center;
justify-content: space-around;
justify-content: space-between;
justify-content: space-evenly;
grid-row-start & grid-row-end
The CSS grid-row-start and grid-row-end properties allow single grid items to take up multiple
rows
grid-column-start & grid-column-
end