Topics for today
- Positioning
- Floats
- One-dimensional layout (Flexbox, Multi-col)
- Grid Systems
width
, height
, margin
width
, height
, margin
have no effect.
width
, height
, margin-top
, margin-bottom
width
, height
, margin-top
, margin-bottom
have no effect.
An element whose representation is outside the scope of CSS
position
!= static
float
& clear
) were how CSS layouts were done until ~2015!
flex-flow: row
flex-flow: column
flex-direction: row;
align-items:
;
justify-content:
;
flex-direction: column;
align-items:
initial
;
justify-content:
initial
;
flex-direction
)display: flex
flex
to stretch items proportionallyauto
margins distribute available spacealign-items
and justify-content
to control alignmentYou may find useful:
display
gap
flex
align-items
justify-content
:focus-within
flex-grow
Save your codepen and submit to
display: contents
do not render their own box, but do render their descendants’ boxes
Corollary: If inside a flex container, their children become flex items instead of themselves