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
Frontend 102
Search
Sebastiaan Deckers
April 15, 2013
Programming
3
500
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
150
Frontend 100
sebdeckers
1
500
Frontend 101
sebdeckers
4
550
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
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
3
950
FlutterKaigi 2025 システム裏側
yumnumm
0
1.2k
「10分以内に機能を消せる状態」 の実現のためにやっていること
togishima
1
530
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
660
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
480
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
6.3k
flutter_kaigi_2025.pdf
kyoheig3
1
350
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
2
1.2k
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
750
CSC509 Lecture 11
javiergs
PRO
0
310
2025 컴포즈 마법사
jisungbin
0
140
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.7k
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Faster Mobile Websites
deanohume
310
31k
Unsuck your backbone
ammeep
671
58k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Thoughts on Productivity
jonyablonski
73
4.9k
Bash Introduction
62gerente
615
210k
Side Projects
sachag
455
43k
How to train your dragon (web standard)
notwaldorf
97
6.4k
BBQ
matthewcrist
89
9.9k
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