Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flexbox all the things
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kristian Andersen
October 28, 2015
Programming
170
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flexbox all the things
Kristian Andersen
October 28, 2015
More Decks by Kristian Andersen
See All by Kristian Andersen
Isomorphic Web Apps with React
ksmandersen
0
52
Static Websites with Gulp & AWS
ksmandersen
0
140
Practical MVVM
ksmandersen
0
230
Practical Swift
ksmandersen
1
220
Introduction to CocoaLumberjack
ksmandersen
0
120
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
970
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
470
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
Webの地図
yosuke_furukawa
PRO
6
4.3k
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
150
Security issues being discussed on Web Platforms
petamoriken
0
850
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.1k
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
120
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
540
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Optimising Largest Contentful Paint
csswizardry
37
4k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Optimizing for Happiness
mojombo
378
71k
Typedesign – Prime Four
hannesfritz
42
3.2k
[SF Ruby Conf 2025] Rails X
palkan
2
1.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
390
Navigating Team Friction
lara
192
16k
Transcript
FLEXBOX ALL THE THINGS
Clearfix <div class="items"> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div
class="clearfix"></div> </div>
Clearfix v2 .clearfix:after { content: ""; display: table; clear: both;
}
Q: Why did the web designer drown? A: She didn’t
know if she should float:left or float:right.
display: flex;
W3C CSS Flexible Box Layout Module Level 1 3rd rev,
September 2012
None
Gracefull degeration & Fallbacks → Polyfill with Flexie (Flexie, still
old syntax) → New Polyfill in the works (Reflexie) → Fallback to float's
Let's get started
Concepts → Flex Containers → Flex Items
Flex Containers display: flex; display: inline-flex;
Flex Lines Items are positioned along a line inside a
flex container
Container Properties
Flex Direction flex-direction: row;
Flex Direction flex-direction: row-reverse;
Flex Direction flex-direction: column;
Flex Wrap flex-wrap: nowrap; flex-wrap: wrap;
Justify content Align items in the main axis
Justify content justify-content: flex-start; justify-content: flex-end;
Justify content justify-content: center;
Justify content justify-content: space-between; justify-content: space-around;
Align items Aligning items in the cross axis
Align items align-items: stretch; align-items: center;
Align items align-items: flex-start; align-items: flex-end;
Align items align-items: baseline;
Align content Align lines within a flex container
Align content
Align content
Align content
Item Properties
Flex Grow
Flex Shrink
Align self
Flex shorthand flex: none | auto | [ <flex-grow> <flex-shrink>?
|| <flex-basis> ];
Let's try it out!
None