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
Kristian Andersen
October 28, 2015
Programming
160
2
Share
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
43
Static Websites with Gulp & AWS
ksmandersen
0
130
Practical MVVM
ksmandersen
0
220
Practical Swift
ksmandersen
1
210
Introduction to CocoaLumberjack
ksmandersen
0
120
Other Decks in Programming
See All in Programming
Vibe NLP for Applied NLP
inesmontani
PRO
0
600
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.5k
Road to RubyKaigi: Play Hard(ware)
makicamel
1
540
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
140
空間オーディオの活用
objectiveaudio
0
120
when storing skills in S3 file
watany
3
1.2k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
cloudnative conference 2026 flyle
azihsoyn
0
100
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
170
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
440
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Curious Case for Waylosing
cassininazir
0
340
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
120
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
A designer walks into a library…
pauljervisheath
211
24k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
Agile that works and the tools we love
rasmusluckow
331
21k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
HDC tutorial
michielstock
2
650
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