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
55
How do we create the first impressions?
cheesecakelabs
0
64
Menstrual cup: suit and freedom
cheesecakelabs
0
80
Life is a cycle, better with a bicycle
cheesecakelabs
0
65
Interview Process: how to get the best of people
cheesecakelabs
1
95
My capsule wardrobe experience
cheesecakelabs
3
75
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
52
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
52
MBTI - Psychological types described by Jung
cheesecakelabs
0
140
Other Decks in Programming
See All in Programming
Oxlintはいいぞ
yug1224
5
1.3k
AtCoder Conference 2025
shindannin
0
1k
CSC307 Lecture 02
javiergs
PRO
1
770
Data-Centric Kaggle
isax1015
2
760
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Fluid Templating in TYPO3 14
s2b
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
920
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
2026年 エンジニアリング自己学習法
yumechi
0
130
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
160
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
140
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
680
Context Engineering - Making Every Token Count
addyosmani
9
650
Mind Mapping
helmedeiros
PRO
0
78
KATA
mclloyd
PRO
34
15k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
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