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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Vladimír Kriška
October 08, 2015
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS Flexbox (WebElement #35)
Vladimír Kriška
October 08, 2015
More Decks by Vladimír Kriška
See All by Vladimír Kriška
Twelve-Factor app with Docker
ujovlado
0
190
Design a REST API you will love to work with
ujovlado
0
810
Docker for PHP developers - Tips, Tricks & Lessons learned
ujovlado
3
530
Docker ‐ from development to production in minutes (PoSobota #91)
ujovlado
0
440
Non-traditional use of Docker (Nette Camp #3)
ujovlado
0
200
Contributions [lightning talk] (PyconCZ 2015)
ujovlado
0
150
Simplify your dev life with Docker (WebElement Banská Bystrica)
ujovlado
0
210
Don't underestimate CSS (WebElement #30)
ujovlado
0
650
Database Migrations in PHP (Posobota #66)
ujovlado
0
180
Other Decks in Programming
See All in Programming
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
110
業務時間外もAIに働いてもらう話
colorful12
3
9.7k
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
140
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
510
源内ハンズオン概要編
hideg
0
240
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
130
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
280
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
570
ALB ログから Trace を気合で繋げる技術
fohte
7
840
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
480
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
200
My Marp Sample
sinoue0108
0
140
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
Everyday Curiosity
cassininazir
0
300
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
The SEO Collaboration Effect
kristinabergwall1
1
540
How STYLIGHT went responsive
nonsquared
100
6.3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
590
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
500
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Abbi's Birthday
coloredviolet
3
9.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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!