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
57
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS Fundamentals
Beatriz Silveira
Cheesecake Labs
May 14, 2018
More Decks by Cheesecake Labs
See All by Cheesecake Labs
Cats' wellness & care
cheesecakelabs
0
75
How do we create the first impressions?
cheesecakelabs
0
86
Menstrual cup: suit and freedom
cheesecakelabs
0
100
Life is a cycle, better with a bicycle
cheesecakelabs
0
87
Interview Process: how to get the best of people
cheesecakelabs
1
130
My capsule wardrobe experience
cheesecakelabs
3
92
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
68
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
71
MBTI - Psychological types described by Jung
cheesecakelabs
0
170
Other Decks in Programming
See All in Programming
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
260
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.2k
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
AIエージェントで 変わるAndroid開発環境
takahirom
2
480
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
220
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
100
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
110
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
3.7k
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
480
フィードバックで育てるAI開発
kotaminato
1
110
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
The Spectacular Lies of Maps
axbom
PRO
1
850
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
340
How to make the Groovebox
asonas
2
2.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
A better future with KSS
kneath
240
18k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Music & Morning Musume
bryan
47
7.3k
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