SlideShare a Scribd company logo
1 of 89
RESPONSIVEWEBDESIGN
Matt Smith / @AllThingsSmitty
A DEEP-DIVE CRASH COURSE
?
2007
http://bit.ly/QnmeZ4
http://bit.ly/qo0qVk
“Everyone once in a while a
revolutionary product comes
along that changes everything.”
http://bit.ly/12sLpv8
http://bit.ly/12sLpv8
http://thebea.st/rq9jCj
http://bit.ly/17VwlLf
http://bit.ly/XvuRWT
0
20
40
60
80
100
120
140
2007 2008 2009 2010 2011 2012
Global iPhone sales
(in million units)
http://bit.ly/XvuRWT
0
100
200
300
400
500
2009 2010 2011 2012
Global Android smartphone sales
(in million units)
http://bit.ly/XvuRWT
0
50
100
150
200
250
300
350
400
450
500
2007 2008 2009 2010 2011 2012
Windows
RIM
Symbian
iPhone
Android
Global smartphone sales
(in million units)
http://read.bi/10SDQm4
http://read.bi/MvOtBk
0.0
10.0
20.0
30.0
40.0
50.0
60.0
April 2009 May 2010 May 2011 April 2012
Percentage of U.S. mobile web use
http://bit.ly/zE1zgp
The penetration of desktop and laptop
ownership in the U.S. is the same today as
it was in 2007.
mobile-only sites
click for the “full desktop site”
Mobile web use will continue to surge over
the next 5 years at a rate of 66% each year.
http://bit.ly/nqdf
http://bit.ly/17zP3rQ
http://bit.ly/197Ma09
http://bit.ly/17zP3rQ
http://bit.ly/109yJsn
http://slidesha.re/MrioZs
http://slidesha.re/MrioZs
http://bit.ly/16HYLdy
http://bit.ly/16I2V5e
http://bit.ly/10ZlqkC
MAY252010
Responsive Web Design
Fluid Layout + CSS3 Media Queries
+ Fluid Images/Media = RWD
FLUIDLAYOUT
?
Fancy Markup + CSS = Grid System
Grid Systems 101
@grid-types {
.fixed {
width: 960px; /* pixel-based */
}
.fluid {
width: 75%; /* percent-based */
}
.elastic {
width: 60em; /* proportion-based */
}
.hybrid {
height: 1.25em; /* combination */
margin-left: 6.191495%;
}
}
@grid-types {
.fixed {
width: 960px; /* pixel-based */
}
.fluid {
width: 75%; /* percent-based */
}
.elastic {
width: 60em; /* proportion-based */
}
.hybrid {
height: 1.25em; /* combination */
margin-left: 6.191495%;
}
}
@grid-types {
.fixed {
width: 960px; /* pixel-based */
}
.fluid {
width: 75%; /* percent-based */
}
.elastic {
width: 60em; /* proportion-based */
}
.hybrid {
height: 1.25em; /* combination */
margin-left: 6.191495%;
}
}
@grid-types {
.fixed {
width: 960px; /* pixel-based */
}
.fluid {
width: 75%; /* percent-based */
}
.elastic {
width: 60em; /* proportion-based */
}
.hybrid {
height: 1.25em; /* combination */
margin-left: 6.191495%;
}
}
the web is not fixed width
http://bit.ly/10AcqLs
<div class="container">
<div class="grid">
<div class="one-third-column">
.container {
margin: 5em;
padding: 0 1em;
max-width: 85%;
}
.grid { padding: 1em 0 5em; }
.one-third-column { width: 33.333333333%;
}
target fluidity
http://bit.ly/YnNo5Y
(target pixel value / context pixel value) *
100 = dimension value in percentage
.one-third-column {
margin: 0 3.317535545023697% 0 0; /*
21px / 633px */
width: 31.1216429699842%; /* 197px /
633px */
}
h1 {
width: calc(1/6 * 100%); /*
16.66666666666667px */
}
http://bit.ly/ww3TNX
CSS3MEDIAQUERIES
<link rel="stylesheet" type="text/css"
href="main.css" media="screen" />
<link rel="stylesheet" type="text/css"
href="print.css" media="print" />
<link rel="stylesheet" type="text/css"
media="screen and (max-device-width:
480px)" href="small.css" />
“Breakpoints”
(max-device-width: 480px)
@media only screen and (max-device-width:
480px) {
.column {
float: none;
}
}
breakpoint
@media
only screen
and (min-device-pixel-ratio: 2)
and (min-width: 320px),
only screen
and (min-resolution: 192dpi)
and (min-resolution: 2dppx) {
/* small screens, Retina display */
.column {
float: none;
}
}
@media only screen and (min-width: 320px)
{
/* small screens */
}
@media only screen and (min-width: 700px)
{
/* medium screens */
}
@media only screen and (min-width:
1300px) {
/* large screens */
}
don‟t rely on device dimensions
http://bit.ly/LZo4uS
“It‟s not about what happens at the
breakpoints, it‟s about what happens
between the breakpoints.”
– JEREMY KEITH
http://bit.ly/IyLnvL
FLUIDIMAGES/MEDIA
img[class*="scale"] {
max-width: 100%;
height: auto;
}
.video iframe,
.video object,
.video embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Responsive Images
<picture>
<source media="(min-width: 40em)"
srcset="big.jpg 1x, big-hd.jpg 2x">
<source srcset="small.jpg 1x, small-
hd.jpg 2x">
<img src="small.jpg" alt="">
</picture>
http://bit.ly/Ska86f
testing across devices
http://bit.ly/159ImPj
http://bit.ly/GVXkNu
http://bit.ly/11Z5Rq0
http://bit.ly/p325bW
disruption will only accelerate
http://bit.ly/XR8O7U
one web
http://bit.ly/YjCtKy
listen to your peers
MYTHSABOUTRWD
“People want to do different things on
mobile, so one adaptive experience is a bad
idea.”
http://bit.ly/10KHnOd
“Responsive Web Design produces bad
performance.”
http://bit.ly/Uh5czr
“Responsive sites/apps require more code
and more testing.”
By 2015, there will be one mobile phone for
every person on Earth.
Google Internal Data
More than half your customers won‟t
recommend your business to a friend if you
have a bad mobile site.
http://bit.ly/qCcpl3
http://bit.ly/Yd0Lmj
When someone searches and finds your
mobile site:
• 61% of them will call you
• 59% will visit you
• 70% of mobile users compare prices
• 65% read product reviews
• 50% of mobile searches have lead to
purchases
this is just the tip of the iceberg
http://slidesha.re/14HG8RJ
http://slidesha.re/14HG8RJ
remember…
Responsive Web Design is not mobile design
Responsive Web Design does not have to
take more time, or cost more money
Responsive Web Design is worth it
“Responsive Web Design rocks. It‟s like
Motörhead playing „Ace of Spades‟ at
Stonehenge…on an asteroid.”
– BRUCE LAWSON
Future Insights Live, April 30, 2013
Responsive Web Design
http://alistapart.com/article/responsive-web-design +
http://www.abookapart.com/products/responsive-web-design
Implementing Responsive Web Design
http://www.implementingresponsivedesign.com/
Adaptive Web Design
http://easy-readers.net/books/adaptive-web-design/
A New Responsive Design Process
http://www.netmagazine.com/features/new-responsive-design-process
Matt Smith / @AllThingsSmitty

More Related Content

Similar to Responsive Web Design: A Deep-Dive Crash Course

[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
Andy Davies
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
20111014 mu me_html5
20111014 mu me_html520111014 mu me_html5
20111014 mu me_html5
Erik Duval
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD
Christopher Schmitt
 

Similar to Responsive Web Design: A Deep-Dive Crash Course (20)

[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
 
Responsive Email Design and Development
Responsive Email Design and DevelopmentResponsive Email Design and Development
Responsive Email Design and Development
 
Creating Responsive Experiences
Creating Responsive ExperiencesCreating Responsive Experiences
Creating Responsive Experiences
 
Mobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile webMobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile web
 
Responsive design
Responsive designResponsive design
Responsive design
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014
 
Optimizing content for the "mobile web"
Optimizing content for the "mobile web"Optimizing content for the "mobile web"
Optimizing content for the "mobile web"
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
 
20111014 mu me_html5
20111014 mu me_html520111014 mu me_html5
20111014 mu me_html5
 
Adaptive layouts - standards>next Manchester 23.03.2011
Adaptive layouts - standards>next Manchester 23.03.2011Adaptive layouts - standards>next Manchester 23.03.2011
Adaptive layouts - standards>next Manchester 23.03.2011
 
Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…
 
Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at Google
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
 
[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design
 
[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Responsive Web Design: A Deep-Dive Crash Course