Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSS Fundamentals
Search
Cheesecake Labs
May 14, 2018
Programming
0
46
CSS Fundamentals
Beatriz Silveira
Cheesecake Labs
May 14, 2018
Tweet
Share
More Decks by Cheesecake Labs
See All by Cheesecake Labs
Cats' wellness & care
cheesecakelabs
0
55
How do we create the first impressions?
cheesecakelabs
0
60
Menstrual cup: suit and freedom
cheesecakelabs
0
78
Life is a cycle, better with a bicycle
cheesecakelabs
0
63
Interview Process: how to get the best of people
cheesecakelabs
1
94
My capsule wardrobe experience
cheesecakelabs
3
70
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
48
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
51
MBTI - Psychological types described by Jung
cheesecakelabs
0
140
Other Decks in Programming
See All in Programming
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
120
Microservices rules: What good looks like
cer
PRO
0
1.5k
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Deno Tunnel を使ってみた話
kamekyame
0
150
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
120
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
160
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
250
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
150
TestingOsaka6_Ozono
o3
0
170
dotfiles 式年遷宮 令和最新版
masawada
1
790
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
60
37k
Writing Fast Ruby
sferik
630
62k
How GitHub (no longer) Works
holman
316
140k
Building AI with AI
inesmontani
PRO
1
560
Practical Orchestrator
shlominoach
190
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Curious Case for Waylosing
cassininazir
0
190
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
160
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
25
Embracing the Ebb and Flow
colly
88
4.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
88
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
Transcript
CSS Fundamentals
Timeline • css1- released in 1996 • css2 - released
in 1998 • css3 - in Development (Split up into independent modules) • https://www.w3.org/TR/
Selectors • Element • Class • ID • Universal •
Attribute
Selection by Element
Selection by Class
Selection by ID
Selection by Attributes
Selection Universal
None
Cascading Style & Specificity Inline Styles #ID .class :pseudo-class [attribute]
<Tag> ::pseudo-element
Combinators • Adjacent Sibling • General Sibling • Child •
Descendant • Group of Selectors
Adjacent Sibling Combinator
General Sibling Combinator
Child Combinator
Descendant Combinator
Group of Selectors
But why Do I need selectors and Combinators ? Spoiler:
To Apply properties
Properties
But how this property interfere in my CSS ?
Every element in HTML is interpreted as a box by
CSS CSS Box Model
Margin Collapsing
Display Property display: block;
Display Property display: inline display: inline-block
Positioning Elements with CSS • Position: • static • Fixed
• Relative • Absolute
Positioning Elements with CSS Position: Static Default value
Positioning Elements with CSS
Positioning Elements with CSS <div> Top Bottom Left Right
Fixed Position
Z-index
Absolute & Relative
Absolute & Relative
Pixel, Percentages & More
How is the size calculated? Absolute Viewport Relative Font Relative
px rem vh em vw %
Rules to remember
REM x EM https://codepen.io/beatriz1304/pen/ELReaJ
vh & vw https://codepen.io/beatriz1304/pen/VxdGKa
Box-sizing box-sizing: content-box; box-sizing: border-box;
Box-sizing
Box-sizing
Some cases not covered • Font Family • pseudo class
and pseudo elements • @media query • Flexbox • Grid Layout • Images • Transition • Animation