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
CSS Flexbox (WebElement #35)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Vladimír Kriška
October 08, 2015
Programming
0
190
CSS Flexbox (WebElement #35)
Vladimír Kriška
October 08, 2015
Tweet
Share
More Decks by Vladimír Kriška
See All by Vladimír Kriška
Twelve-Factor app with Docker
ujovlado
0
150
Design a REST API you will love to work with
ujovlado
0
780
Docker for PHP developers - Tips, Tricks & Lessons learned
ujovlado
3
510
Docker ‐ from development to production in minutes (PoSobota #91)
ujovlado
0
400
Non-traditional use of Docker (Nette Camp #3)
ujovlado
0
170
Contributions [lightning talk] (PyconCZ 2015)
ujovlado
0
120
Simplify your dev life with Docker (WebElement Banská Bystrica)
ujovlado
0
190
Don't underestimate CSS (WebElement #30)
ujovlado
0
620
Database Migrations in PHP (Posobota #66)
ujovlado
0
150
Other Decks in Programming
See All in Programming
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
3
380
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
110
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
220
CSC307 Lecture 14
javiergs
PRO
0
450
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
500
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
580
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
520
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
130
Featured
See All Featured
From π to Pie charts
rasagy
0
140
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
300
My Coaching Mixtape
mlcsv
0
63
Become a Pro
speakerdeck
PRO
31
5.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Facilitating Awesome Meetings
lara
57
6.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
GraphQLとの向き合い方2022年版
quramy
50
14k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
100
Marketing to machines
jonoalderson
1
5k
Transcript
CSS FLEXBOX Vladimír Kriška (@ujovlado) WebElement #35
None
None
Classic “floats”
None
Flexbox applied* *and minor improvements: styled button, changed image position
None
Container, items, … source: http://www.w3.org/TR/css-flexbox-1/
flex-flow (shorthand) flex-direction • row, row-reverse, column, column-reverse • initial
value: row flex-wrap • nowrap, wrap, wrap-reverse • initial value: nowrap • flex-direction || flex-wrap
order • <int> • initial value: 0 • affects only
visual media (not speech) • use it for visual, not logical ordering
Single-line & multi-line Once content is broken into lines, each
line is independent
The “flex” property (shorthand) • none, [flex-grow && flex-shrink ||
flex-basis] • flex: none • 0 0 auto • flex: initial (this is an initial value) • 0 1 auto • flex: auto • 1 1 auto • flex: <int> • <int> 1 0% (e.g. flex: 10 => flex: 10 1 0%)
flex-grow & flex-shrink & flex-basis flex-grow how much the flex
item will grow relative to the rest of the flex items flex-shrink how much the flex item will shrink relative to the rest of the flex items flex-basis initial main size of the flex item, before free space is distributed according to the flex factors
flex: 1 0 20%* *with min-width applied and disabled max-width
min-width: 200px;
Different flex for each box* min-width: 200px; *with min-width applied
and disabled max-width
None
justify-content • flex-start, flex-end, center, space-between, space-around • initial value:
flex-start source: http://www.w3.org/TR/css-flexbox-1/
justify-content: center
None
align-items, align-self align-items • flex-start, flex-end, center, baseline, stretch •
initial value: stretch • applies to: containers align-self • auto, flex-start, flex-end, center, baseline, stretch • initial value: auto • applies to: items
align-items, align-self source: http://www.w3.org/TR/css-flexbox-1/
So, how to center div vertically?
None
Questions? No? Thank you!