Part 3: Flexbox
Introduction
The Flexbox Mental Model
<div class="container"> <!-- flex container -->
<div class="item">A</div>
<div class="item">B</div>
<div class="item">C</div>
</div>.container {
display: flex; /* activates flexbox */
}Container Properties
flex-direction
flex-directionflex-wrap
flex-wrapflex-flow Shorthand
flex-flow Shorthandjustify-content
justify-contentalign-items
align-itemsalign-content
align-contentgap
gapItem Properties
flex-grow
flex-growflex-shrink
flex-shrinkflex-basis
flex-basisflex Shorthand
flex Shorthandalign-self
align-selforder
orderCommon Flexbox Patterns
Horizontal Navigation Bar
Card Row That Wraps
Vertically Centred Full-Page Layout
Sidebar Layout
Centring Anything
min-width: 0 — The Classic Flex Gotcha
min-width: 0 — The Classic Flex GotchaDebugging Flexbox
Summary
Property
Applies to
Purpose
Up Next
Last updated