Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flexbox all the things
Search
Kristian Andersen
October 28, 2015
Programming
2
150
Flexbox all the things
Kristian Andersen
October 28, 2015
Tweet
Share
More Decks by Kristian Andersen
See All by Kristian Andersen
Isomorphic Web Apps with React
ksmandersen
0
36
Static Websites with Gulp & AWS
ksmandersen
0
130
Practical MVVM
ksmandersen
0
210
Practical Swift
ksmandersen
1
200
Introduction to CocoaLumberjack
ksmandersen
0
110
Other Decks in Programming
See All in Programming
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
230
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
350
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
380
Cap'n Webについて
yusukebe
0
140
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
3
890
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
770
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
75
Balancing Empowerment & Direction
lara
5
810
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
290
A Modern Web Designer's Workflow
chriscoyier
698
190k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
34
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
21
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
38
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
WCS-LA-2024
lcolladotor
0
380
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
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