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
Responsive Web Design in a Nutshell
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lean Machine
September 05, 2013
Programming
150
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Responsive Web Design in a Nutshell
Lean Machine
September 05, 2013
Transcript
26 slides
Responsive Web Design ... in a nutshell. leanmachine.se ▪
[email protected]
▪ 2013-09-06
What’s all the fuss about?
None
Our websites need to work on all devices
Responsive vs. Adaptive
Responsive vs. Adaptive Layout is fluid. Media queries are used
to change the layout when it “breaks down”
Responsive vs. Adaptive A set of pre-defined layout widths is
used. No fluid layout. Layout is fluid. Media queries are used to change the layout when it “breaks down”
http://liquidapsive.com/ Super sweet demo
Mixed Approach Fixed width layouts for large and medium. Fluid
layout for small.
How do I make my site responsive?
1 The Viewport Meta Tag <meta name="viewport" content="width=device-width, initial-scale=1">
2 Percentages in CSS .main-content { width: 67%; } .side-column
{ width: 33%; }
3 CSS Media Queries div.content { width: 1100px; margin: 0
auto; } /* Large monitors */ @media screen and (min-width: 1600px) { div.content { width: 1440px; } } ... /* Tablets in portrait */ @media screen and (min-width: 761px) and (max-width: 990px) { div.content { width: 740px; } } /* Mobile */ @media screen and (max-width: 760px) { div.content { width: 100%; } }
4 Responsiveness in JavaScript // Detect screen size // ------------------
if (window.innerWidth < 768) { // Do stuff specific to mobile } // ... or use enquire.js // --------------------- enquire.register("screen and (min-width:768px)", function() { // Load sidebar content in via AJAX. // Show sidebar });
Responsive Design Patterns
1 2 3 1 2 3
http://bradfrost.github.io/this-is-responsive/patterns.html Tons of examples
Useful Tools
Front-end Frameworks
None
Front-end Frameworks Fast and easy to get started. +
Front-end Frameworks Fast and easy to get started. + Pollutes
your HTML and can limit you. –
https://github.com/scottjehl/Respond Respond.js Makes old browsers (IE8-) support Media Queries.
Responsive Web Safari!
1. http://trentwalton.com/ 2. http://www.bostonglobe.com/ 3. https://corporate.target.com/ 4. http://css-tricks.com/ 5. http://elliotjaystocks.com/
6. http://www.leanmachine.se/ 7. http://www.awwwards.com/ 8. http://www.squarespace.com/stories 9. http://www.jessicahische.is/ 10. http://forefathersgroup.com/ 11. http://palantir.net/ 12. http://www.ampersandconf.com/
leanmachine.se ▪
[email protected]
▪ 2013-09-06
More Decks by Lean Machine
See All by Lean Machine
Graceful Degradation with Modernizr
leanmachine
1
1.1k
Intro to HTML5
leanmachine
3
1k
Organizing Stylesheets with CSS Pre-processors
leanmachine
2
970
Seven UX Design Rules
leanmachine
9
1.1k
JavaScript Closures
leanmachine
1
1.1k
JavaScript Inheritance
leanmachine
2
1.1k
Asynchronous JavaScript
leanmachine
1
980
JavaScript Promises
leanmachine
2
1.1k
Other Decks in Programming
See All in Programming
眠らない開発チームの作り方
biwakonbu
0
100
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
110
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
小さなアプリを作って公開するまで
onozaty
0
240
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
440
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
はじめてのPLATEAU
nokonoko1203
1
670
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
数行の変更でDockerビルドを最大91%高速化~GitLab CIの実行基盤を社内40リポジトリに展開するまで~
picopico
2
270
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
340
Un-Boring Meetings
codingconduct
0
510
The Curse of the Amulet
leimatthew05
4
17k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
Believing is Seeing
oripsolob
1
290
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
The agentic SEO stack - context over prompts
schlessera
0
1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
Rails Girls Zürich Keynote
gr2m
96
14k