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
64
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
89
How do we create the first impressions?
cheesecakelabs
0
100
Menstrual cup: suit and freedom
cheesecakelabs
0
120
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
110
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
79
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
93
MBTI - Psychological types described by Jung
cheesecakelabs
0
180
Other Decks in Programming
See All in Programming
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
560
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
0
170
Jetpack Compose Mechanisms
skydoves
3
820
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
480
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
カツオ、ご期待ください
suneo3476
0
190
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
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