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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Cheesecake Labs
May 14, 2018
Programming
66
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS Fundamentals
Beatriz Silveira
Cheesecake Labs
May 14, 2018
Transcript
40 slides
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
More Decks by Cheesecake Labs
See All by Cheesecake Labs
Cats' wellness & care
cheesecakelabs
0
99
How do we create the first impressions?
cheesecakelabs
0
110
Menstrual cup: suit and freedom
cheesecakelabs
0
130
Life is a cycle, better with a bicycle
cheesecakelabs
0
100
Interview Process: how to get the best of people
cheesecakelabs
1
160
My capsule wardrobe experience
cheesecakelabs
3
120
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
84
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
98
MBTI - Psychological types described by Jung
cheesecakelabs
0
200
Other Decks in Programming
See All in Programming
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
130
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
980
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
680
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
55
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
370
KATA
mclloyd
PRO
35
16k
Optimizing for Happiness
mojombo
378
72k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
Building AI with AI
inesmontani
PRO
1
1.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
370
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
830
Testing 201, or: Great Expectations
jmmastey
46
8.4k