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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.3k
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
140
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
13
7.7k
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
580
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
180
CSC307 Lecture 11
javiergs
PRO
0
580
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
170
SourceGeneratorのマーカー属性問題について
htkym
0
120
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
120
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
340
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
200
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Statistics for Hackers
jakevdp
799
230k
Ethics towards AI in product and experience design
skipperchong
2
210
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
190
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
110
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
860
Building an army of robots
kneath
306
46k
Tell your own story through comics
letsgokoyo
1
830
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The Cult of Friendly URLs
andyhume
79
6.8k
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!