Introduction to CSS Grid
- CSS Grid layout is a two-dimensional grid layout.
- Grid is compared to any web layout system of the past, completely changes the way we design user interfaces
- Using Grid we can make vertical centering easy.
grid-template-columns
- The
grid-template-columns
property defines the line names and track sizing functions of the grid columns.
grid-template-rows
- The
grid-template-rows
property defines the line names and track sizing functions of the grid rows.
justify-items
justify-items
is used to justify the grid items along the row axis.- The possible values are
start
,end
,center
andstretch
.
align-items
align-items
is used to justify the grid items along the column axis.- The possible values are
start
,end
,center
andstretch
.
justify-content
- The
justify-content
property defines how the browser distributes space between and around content items along the main-axis of a flex.
grid-column-start
- The
grid-column-start
property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area.
grid-column-end
- The
grid-column-end
property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area.
grid-row-start
- The
grid-row-start
property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area.
grid-row-end
- The
grid-row-end
property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area.