Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSS Fundamentals
Search
Cheesecake Labs
May 14, 2018
Programming
62
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
86
How do we create the first impressions?
cheesecakelabs
0
94
Menstrual cup: suit and freedom
cheesecakelabs
0
120
Life is a cycle, better with a bicycle
cheesecakelabs
0
96
Interview Process: how to get the best of people
cheesecakelabs
1
150
My capsule wardrobe experience
cheesecakelabs
3
100
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
77
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
86
MBTI - Psychological types described by Jung
cheesecakelabs
0
180
Other Decks in Programming
See All in Programming
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
650
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
440
信頼性の目標を誰も求めてない
shubox
0
500
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
55
37k
高専キャリア LT 発表内容
crysta1221
6
5.6k
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
1.1k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
5.7k
App Intentsのビルドプロセスを支える技術
kntkymt
0
190
Featured
See All Featured
Between Models and Reality
mayunak
4
450
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
270
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
270
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Mind Mapping
helmedeiros
1
350
Fireside Chat
paigeccino
43
4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How GitHub (no longer) Works
holman
316
150k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
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