- Definition: Explain how Flexbox is a layout model that allows the creation of flexible and responsive layouts.
- Main Concepts: Discuss main concepts like flex containers and flex items.
- display: Explain how to define an element as a flex container using
display: flex;
. - flex-direction: Detail the direction of flex items within the flex container (
row
,row-reverse
,column
,column-reverse
). - flex-wrap: Describe how items wrap within the flex container (
nowrap
,wrap
,wrap-reverse
). - justify-content: Explain alignment along the main axis (
flex-start
,flex-end
,center
,space-between
,space-around
,space-evenly
). - align-items: Detail alignment along the cross axis (
flex-start
,flex-end
,center
,baseline
,stretch
). - align-content: Discuss alignment for multiple lines within the flex container (
flex-start
,flex-end
,center
,space-between
,space-around
,stretch
).
- order: Explain the order of individual flex items.
- flex-grow: Detail how items grow relative to other items within the container.
- flex-shrink: Describe how items shrink relative to other items within the container.
- flex-basis: Specify the initial size of a flex item.
- flex: Combine
flex-grow
,flex-shrink
, andflex-basis
into a shorthand property. - align-self: Explain how to override
align-items
on individual flex items.
- Definition: Explain how Grid Layout is a two-dimensional system for laying out elements in columns and rows.
- Main Concepts: Discuss grid containers, grid items, rows, columns, and tracks.
- display: Define an element as a grid container using
display: grid;
. - grid-template-columns/grid-template-rows: Specify the size of grid tracks (columns/rows).
- grid-gap: Set the gap between grid tracks.
- justify-items: Align grid items along the inline (row) axis.
- align-items: Align grid items along the block (column) axis.
- justify-content: Align grid tracks along the inline (row) axis.
- align-content: Align grid tracks along the block (column) axis.
- grid-column-start/grid-column-end/grid-row-start/grid-row-end: Specify the location of grid items within the grid.
- grid-column/grid-row: Shorthand for grid-column-start and grid-column-end/grid-row-start and grid-row-end.
- grid-area: Assign a name to a grid item for easy placement within the grid.