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 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
61
How do we create the first impressions?
cheesecakelabs
0
69
Menstrual cup: suit and freedom
cheesecakelabs
0
83
Life is a cycle, better with a bicycle
cheesecakelabs
0
68
Interview Process: how to get the best of people
cheesecakelabs
1
110
My capsule wardrobe experience
cheesecakelabs
3
77
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
56
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
57
MBTI - Psychological types described by Jung
cheesecakelabs
0
150
Other Decks in Programming
See All in Programming
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
440
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
160
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
SourceGeneratorのマーカー属性問題について
htkym
0
220
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
620
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
390
CSC307 Lecture 15
javiergs
PRO
0
260
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
AI活用のコスパを最大化する方法
ochtum
0
320
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
420
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
990
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Practical Orchestrator
shlominoach
191
11k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
230
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Marketing to machines
jonoalderson
1
5k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
It's Worth the Effort
3n
188
29k
Chasing Engaging Ingredients in Design
codingconduct
0
150
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