Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flexbox all the things
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
51
Static Websites with Gulp & AWS
ksmandersen
0
140
Practical MVVM
ksmandersen
0
230
Practical Swift
ksmandersen
1
210
Introduction to CocoaLumberjack
ksmandersen
0
120
Other Decks in Programming
See All in Programming
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.8k
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
150
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
170
yield再入門 #phpcon
o0h
PRO
0
870
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
130
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
200
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
190
Android CLI
fornewid
0
200
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
160
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Code Review Best Practice
trishagee
74
20k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Exploring anti-patterns in Rails
aemeredith
3
450
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
So, you think you're a good person
axbom
PRO
2
2.1k
Become a Pro
speakerdeck
PRO
31
6k
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