Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Frontend 102
Search
Sebastiaan Deckers
April 15, 2013
Programming
3
510
Frontend 102
Sebastiaan Deckers
April 15, 2013
Tweet
Share
More Decks by Sebastiaan Deckers
See All by Sebastiaan Deckers
Commons Host: Building a CDN for the rest of the world
sebdeckers
1
140
SVG Reality
sebdeckers
5
150
About Sebastiaan
sebdeckers
0
160
Frontend 100
sebdeckers
1
510
Frontend 101
sebdeckers
4
560
Frontend 103
sebdeckers
2
500
Frontend Testing
sebdeckers
3
350
Grunt: The JavaScript Task Runner
sebdeckers
8
410
Other Decks in Programming
See All in Programming
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
270
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
ゲームの物理 剛体編
fadis
0
370
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
360
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
450
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
39
26k
認証・認可の基本を学ぼう後編
kouyuume
0
250
Python札幌 LT資料
t3tra
7
1k
開発に寄りそう自動テストの実現
goyoki
2
1.4k
AIコーディングエージェント(NotebookLM)
kondai24
0
230
マスタデータ問題、マイクロサービスでどう解くか
kts
0
120
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
Faster Mobile Websites
deanohume
310
31k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
28
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
34
Skip the Path - Find Your Career Trail
mkilby
0
27
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
For a Future-Friendly Web
brad_frost
180
10k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
Transcript
102 Layout Box model Content flow Positioning Weirdness
box model
box model content box < padding box < border box
< margin box
box model clockwise from the top top right bottom left
img { margin: 10px 5px 0px 20px; }
content box determined by text or fixed size p {
font-size: 14pt; line-height: 1.5; font-family: "Helvetica Neue"; } img { width: 300px; height: 150px; }
padding box adds a gap between content and border, makes
it easier to click elements button { padding: 20px; }
border box width, style, color header { border: 8px solid
gold; }
adds a gap between border and other boxes img {
margin: 25px; } margin box
content flow
1. Left to right 2. Top to bottom
Floats: easy to abuse, better to avoid Useful mostly for
images in a blog post Absolute/fixed positioning: Choose the top, right, bottom, or left distance from a container or viewport. Take it out of the flow
positioning X/Y axis: left to right, top to bottom Reference:
static, fixed, relative, absolute
weirdness Negative margin Overlapping z-index Cut off overflow