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
37
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
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Graviton と Nitro と私
maroon1st
0
140
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
160
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
tparseでgo testの出力を見やすくする
utgwkk
2
280
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
260
Implementation Patterns
denyspoltorak
0
120
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Designing for Performance
lara
610
69k
For a Future-Friendly Web
brad_frost
180
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Embracing the Ebb and Flow
colly
88
4.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
250
Testing 201, or: Great Expectations
jmmastey
46
7.8k
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