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
AWS CDKの推しポイントN選
akihisaikeda
1
240
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
480
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
160
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
AIコーディングエージェント(skywork)
kondai24
0
170
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
380
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Building Adaptive Systems
keathley
44
2.9k
Raft: Consensus for Rubyists
vanstee
141
7.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Designing for Performance
lara
610
69k
Making Projects Easy
brettharned
120
6.5k
Building Applications with DynamoDB
mza
96
6.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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