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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
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
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Seven New Principles of Software Engineering
yegor256
0
500
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
750
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
260
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
190
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
290
Distance field of Julia set
kinakomoti321
0
320
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
160
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
620
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
15
40k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
KATA
mclloyd
PRO
35
16k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
Code Reviewing Like a Champion
maltzj
529
40k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Producing Creativity
orderedlist
PRO
348
41k
A Modern Web Designer's Workflow
chriscoyier
699
190k