SlideShare a Scribd company logo
1 of 53
Using Responsive Web Design To
Make Your Web Work Everywhere
Chris Love
http://Love2Dev.com
@ChrisLove
Who Am I
• ASP.NET MVP
• ASP Insider
• Internet Explorer User Agent
• Author
• Speaker
• Tweaker, Lover of Web, JavaScript, CSS & HTML5
• @ChrisLove
• Love2Dev.com
Slide Deck & Source Code
• Slide Deck – http://slideshare.net/docluv/presentations
• Source Code – http://GitHub.com/docluv
Responsive web design is design
that responds to the screen size it’s
being viewed on.
http://bit.ly/20p5Qc0
SEO
“Google not only recommends RWD as the best way to
target mobile users , but also favors mobile-optimized sites
when presenting results for searches made on a mobile
device.”
- Hayley Francis
http://bit.ly/1VcJXNY
SEO
“Mobile websites can suffer from a high bounce rate if the
content they offer is too stripped down, or too dissimilar
from the content offered on the desktop site. Google will
interpret this high bounce rate as a sign that a website isn’t
offering relevant content to users, which is likely to lead to a
drop in rankings.”
- Hayley Francis
http://bit.ly/1VcJXNY
Single Web Site/App
•Easier to Maintain
•Consistent Content Makes Users Happy
•User Tend to use more than 1 device to
engage with business
Not Being Mobile Friendly Turns Away
Customers
•Lower Engagement Rates
•Lower brand Image (ie That Site Sux)
Make Sure Basic Responsiveness Works
• The viewport as a whole needs to scale. In short, horizontal scrollbars
are not your friend. No matter how small the viewport might get, no
horizontal scrollbar should appear.
Make Sure Basic Responsiveness Works
• Things shouldn’t get cut off unpredictably. Don’t put hard limits on
certain block widths or texts. Always find a way to make things scale,
crop, or predict how they will cut off, and then make them look right.
Make Sure Basic Responsiveness Works
• Don’t wrap menus. The hamburger icons, although controversial, are
a nice trick to make menus look good on most devices. Alternatively,
use shorter menus altogether.
Make Sure Basic Responsiveness Works
• Make the images fit. If you ever get surprised by a horizontal scrollbar,
it’s most likely due to an image not scaling properly. Making your
images responsive is a must-do for every web design project.
Make your design “content-first”
•Remove what’s unimportant as the screen gets
smaller
•The key to intelligent responsive design is
predicting what parts of the page become
unimportant as the viewport gets smaller.
•Stating Mobile 1st makes this exercise easier
• 60% of adults use at least 2
devices every day, while 40%
have changed device through an
activity
• http://bit.ly/22jCR95
What is Adaptive?
• Uses Server-Side Device Detection
• WURFL
• Separate Site
• Usually m.<domain>.com
• Requires maintaining 2 Code Bases
• In Theory You Can Make a ‘mobile’ optimized version
• In Reality A PITA
• Often 3rd party solution that scraped full site for content
Assuming User Needs
• You Can Determine User
Expectations Based on Device
• Reality Most Mobile Activity
Occurs on a Couch or Lean
Back Scenario
Assuming User Needs
“I think the key is not to assume anything. We don’t really know what
our users have come to look at. So, we can’t say, “Oh, it’s okay. This
person is on a mobile, so we’re going to cut out a load of the content so
they can’t reach it.”
John Cleveley BBC News
http://responsivewebdesign.com/podcast/bbc.html
“this unspoken agreement to pretend that we had a certain size. And
that size changed over the years. For a while, we all sort of tacitly
agreed that 640 by 480 was the right size, and then later than changed
to 800:600, and 1024; we seem to have settled on this 960 pixel as
being this like, default. It’s still unknown. We still don’t know the size of
the browser; it’s just like this consensual hallucination that we’ve all
agreed to participate in: “Let’s assume the browser has a browser
width of at least 960 pixels.”
Jeremy Keith
bit.ly/1bhH6rw
“The emergence of ideas like “responsive design” and “future-friendly
thinking” are in part a response to the collective realization that
designing products that solve one problem in one context at a time is
no longer sustainable. By refocusing our process on systems that are
explicitly designed to adapt to a changing environment, we have an
opportunity to develop durable, long-lasting designs that renew their
usefulness and value over time.”
Wilson Miner
bit.ly/1fbq5lB
“Any attempt to draw a line around a particular device class
has as much permanence as a literal line in the sand. Pause for
a moment and the line blurs. Look away and it will be gone.
Let’s take the absolute best case scenario. You’re building a
web app for internal users for whom you get to specify what
computer is purchased and used. You can specify the browser,
the monitor size, keyboard, etc.”
Jason Grigsby
bit.ly/KzJH9G
“How long do you think that hardware will be able to be found? Three
years from now when a computer dies and has to be replaced, what
are the chances that the new monitor will be a touchscreen?
By making a decision to design solely for a “desktop UI”, you are
creating technical debt and limiting the longevity of the app you’re
building. You’re designing to a collective hallucination. You don’t have
to have a crystal ball to see where things are headed.
And once you start accepting the reality that the lines inside form
factors are as blurry as the lines between them, then responsiveness
becomes a necessity.”
Jason Grigsby
bit.ly/KzJH9G
Responsive Web Design
• Introduced by Ethan Marcotte 2010 - bit.ly/178an9e
• Web Design Approach To Create An Optimal Viewing
Experience Across All Browser ViewPorts
• Fluid Layouts
• Media Queries
• Minimal if any JavaScript Required
Mobile First
• Determine The Most Important
Information
• Expand From There
• Start Responsive Design Mobile
First
• You will be doing yourself a favor
• Code is much easier to write and
maintain
Fluid Layout
•Stretch as the Browser ViewPort Changes
•Browser’s Viewable Area Inside the Chrome
•Serve as the Foundation for the Web Application
Layout
•Great Way To Create Native Like Experience
Media Queries
@media (min-width: 600px) {
/* Selectors & Rules */
}
@media (min-width: 820px) {
/* Selectors & Rules */
}
@media (min-width: 1080px) {
/* Selectors & Rules */
}
Responsive Navigation
•Use Media Queries to Optimize Rendering
•Show and Hide Content Based on ViewPort
Dimensions
•Create A Mobile Friendly View
•Optimize for Large Screens Without Device
Detection
Responsive Web
Development
Tactics & Tools
Resize the Browser
Start Small & Increase Viewport
Chrome Device Mode
• https://developers.google.com/web/tools/chrome-
devtools/iterate/device-mode/
Chrome Device Mode
• Emulate your site across different screen sizes and resolutions,
including Retina displays.
• Responsively design by visualizing and inspecting CSS media queries.
• Evaluate your site’s performance using the network emulator, without
affecting traffic to other tabs.
Chrome Device Mode
• Set the Viewport
• Manually using the responsive option
• Allows you to freely test and plan for unknown devices
• Or Chose A Specific Device
• Allows you to see current popular device rendering experiences
Chrome Device Mode Presets
• Sets the correct "User Agent" (UA) string.
• Sets the device resolution and DPI (device pixel ratio).
• Emulates touch events (if applicable).
• Emulates mobile scrollbar overlays and meta viewport.
• Autosizes (boosts) text for pages without a defined viewport.
Chrome Device Emulation Toggle States &
Orientation
• Default browser UI
• With Chrome navigation
bar
• With opened keyboard
matchMedia
•Allows You To Bind JavaScript Callbacks to
MediaQuery Breakpoints
•Available in All Modern Browsers (IE 10+)
•Eliminated Need to Bind to Resize Event
matchMedia
window.matchMedia("(min-width: 400px)").addListener(function (e) {
if(e.matches)
{
console.info("the view port is at least 400 pixels wide");
}else{
console.info("the view port is not at least 400 pixels wide");
}
});
Make Your Web Work Everywhere with Responsive Design

More Related Content

What's hot

Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Aaron Gustafson
 
Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]Aaron Gustafson
 
Strategy for a Responsive UX
Strategy for a Responsive UXStrategy for a Responsive UX
Strategy for a Responsive UXNuno MB Rodrigues
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlChristian Heilmann
 
Beyond Responsive Workshop [Beyond Tellerrand 2014]
Beyond Responsive Workshop [Beyond Tellerrand 2014]Beyond Responsive Workshop [Beyond Tellerrand 2014]
Beyond Responsive Workshop [Beyond Tellerrand 2014]Aaron Gustafson
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile WebMorgan Cheng
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsWorkurious
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devicesjameswillweb
 
Lecture 1: Web Design + Usability
Lecture 1: Web Design + UsabilityLecture 1: Web Design + Usability
Lecture 1: Web Design + Usabilitymcongdon
 
Responsive images are here. Now what?
Responsive images are here. Now what?Responsive images are here. Now what?
Responsive images are here. Now what?Jason Grigsby
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignDave Olsen
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practicesmintersam
 
Web Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and TechnologiesWeb Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and TechnologiesAbdul Rahman Sherzad
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Devicefilirom1
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Atos_Worldline
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performanceSagar Desarda
 
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesWordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesmtoppa
 
Responsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for BeginnersResponsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for BeginnersBootstrap Creative
 
Introduction to web design
Introduction to web designIntroduction to web design
Introduction to web designFitra Sani
 

What's hot (20)

Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]Beyond Responsive [18F 2015]
Beyond Responsive [18F 2015]
 
Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]
 
Strategy for a Responsive UX
Strategy for a Responsive UXStrategy for a Responsive UX
Strategy for a Responsive UX
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
Beyond Responsive Workshop [Beyond Tellerrand 2014]
Beyond Responsive Workshop [Beyond Tellerrand 2014]Beyond Responsive Workshop [Beyond Tellerrand 2014]
Beyond Responsive Workshop [Beyond Tellerrand 2014]
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 Tips
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
Web Development Life Cycle
Web Development Life CycleWeb Development Life Cycle
Web Development Life Cycle
 
Lecture 1: Web Design + Usability
Lecture 1: Web Design + UsabilityLecture 1: Web Design + Usability
Lecture 1: Web Design + Usability
 
Responsive images are here. Now what?
Responsive images are here. Now what?Responsive images are here. Now what?
Responsive images are here. Now what?
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Web Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and TechnologiesWeb Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and Technologies
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Device
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
 
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesWordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
 
Responsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for BeginnersResponsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for Beginners
 
Introduction to web design
Introduction to web designIntroduction to web design
Introduction to web design
 

Viewers also liked

JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsChris Love
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image StrategyChris Love
 
10 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 201610 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 2016Chris Love
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so goodChris Love
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsChris Love
 

Viewers also liked (6)

JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms tools
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image Strategy
 
10 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 201610 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 2016
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so good
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 

Similar to Make Your Web Work Everywhere with Responsive Design

Responsive web design
Responsive web designResponsive web design
Responsive web designChris Love
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Chris Love
 
Responsive Web Design - Why and How
Responsive Web Design - Why and HowResponsive Web Design - Why and How
Responsive Web Design - Why and HowJudi Wunderlich
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsChris Love
 
Responsive Design: The "other" way of doing mobile sites.
Responsive Design: The "other" way of doing mobile sites.Responsive Design: The "other" way of doing mobile sites.
Responsive Design: The "other" way of doing mobile sites.meetmicah
 
Responsive Web Design
Responsive Web Design Responsive Web Design
Responsive Web Design CLEVER°FRANKE
 
Mobile SEO (English Version)
Mobile SEO (English Version)Mobile SEO (English Version)
Mobile SEO (English Version)ssuserd60633
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013Marc D Anderson
 
Responsive Web Design_2013
Responsive Web Design_2013Responsive Web Design_2013
Responsive Web Design_2013Achieve Internet
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJulia Vi
 
Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"Sachin Katariya
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web designNate Walton
 
Why should we build our website responsive
Why should we build our website responsiveWhy should we build our website responsive
Why should we build our website responsiveOmkarsoft Bangalore
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design pptNAWAZ KHAN
 
How to create a mobile version of your website
How to create a mobile version of your websiteHow to create a mobile version of your website
How to create a mobile version of your websiteMahmoud Farrag
 
Adaptive design: what is it and why should I be using it?
Adaptive design: what is it and why should I be using it?Adaptive design: what is it and why should I be using it?
Adaptive design: what is it and why should I be using it?Muhamad Izwan
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio
 

Similar to Make Your Web Work Everywhere with Responsive Design (20)

Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
Responsive Web Design - Why and How
Responsive Web Design - Why and HowResponsive Web Design - Why and How
Responsive Web Design - Why and How
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page Applications
 
Responsive Design: The "other" way of doing mobile sites.
Responsive Design: The "other" way of doing mobile sites.Responsive Design: The "other" way of doing mobile sites.
Responsive Design: The "other" way of doing mobile sites.
 
Responsive Web Design
Responsive Web Design Responsive Web Design
Responsive Web Design
 
Mobile SEO (English Version)
Mobile SEO (English Version)Mobile SEO (English Version)
Mobile SEO (English Version)
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Responsive Web Design_2013
Responsive Web Design_2013Responsive Web Design_2013
Responsive Web Design_2013
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web design
 
Why should we build our website responsive
Why should we build our website responsiveWhy should we build our website responsive
Why should we build our website responsive
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
 
How to create a mobile version of your website
How to create a mobile version of your websiteHow to create a mobile version of your website
How to create a mobile version of your website
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Adaptive design: what is it and why should I be using it?
Adaptive design: what is it and why should I be using it?Adaptive design: what is it and why should I be using it?
Adaptive design: what is it and why should I be using it?
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web Design
 
Sbwire 531031
Sbwire 531031Sbwire 531031
Sbwire 531031
 

More from Chris Love

Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API IntroductionChris Love
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsChris Love
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsChris Love
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website AssetsChris Love
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for EducationChris Love
 
The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...Chris Love
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingChris Love
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveChris Love
 
Html5 Fit: Get Rid of Love Handles
Html5 Fit:  Get Rid of Love HandlesHtml5 Fit:  Get Rid of Love Handles
Html5 Fit: Get Rid of Love HandlesChris Love
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tipsChris Love
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft EdgeChris Love
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek editionChris Love
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basicsChris Love
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App TodayChris Love
 
A night at the spa
A night at the spaA night at the spa
A night at the spaChris Love
 
Developing and deploying a website with html5
Developing and deploying a website with html5Developing and deploying a website with html5
Developing and deploying a website with html5Chris Love
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampChris Love
 

More from Chris Love (19)

Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API Introduction
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web Applications
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web Applications
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker Caching
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will love
 
Html5 Fit: Get Rid of Love Handles
Html5 Fit:  Get Rid of Love HandlesHtml5 Fit:  Get Rid of Love Handles
Html5 Fit: Get Rid of Love Handles
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft Edge
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basics
 
Touch the web
Touch the webTouch the web
Touch the web
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 
SPAs Are Easy
SPAs Are EasySPAs Are Easy
SPAs Are Easy
 
A night at the spa
A night at the spaA night at the spa
A night at the spa
 
Developing and deploying a website with html5
Developing and deploying a website with html5Developing and deploying a website with html5
Developing and deploying a website with html5
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Make Your Web Work Everywhere with Responsive Design

  • 1. Using Responsive Web Design To Make Your Web Work Everywhere Chris Love http://Love2Dev.com @ChrisLove
  • 2. Who Am I • ASP.NET MVP • ASP Insider • Internet Explorer User Agent • Author • Speaker • Tweaker, Lover of Web, JavaScript, CSS & HTML5 • @ChrisLove • Love2Dev.com
  • 3. Slide Deck & Source Code • Slide Deck – http://slideshare.net/docluv/presentations • Source Code – http://GitHub.com/docluv
  • 4. Responsive web design is design that responds to the screen size it’s being viewed on.
  • 6. SEO “Google not only recommends RWD as the best way to target mobile users , but also favors mobile-optimized sites when presenting results for searches made on a mobile device.” - Hayley Francis http://bit.ly/1VcJXNY
  • 7. SEO “Mobile websites can suffer from a high bounce rate if the content they offer is too stripped down, or too dissimilar from the content offered on the desktop site. Google will interpret this high bounce rate as a sign that a website isn’t offering relevant content to users, which is likely to lead to a drop in rankings.” - Hayley Francis http://bit.ly/1VcJXNY
  • 8. Single Web Site/App •Easier to Maintain •Consistent Content Makes Users Happy •User Tend to use more than 1 device to engage with business
  • 9. Not Being Mobile Friendly Turns Away Customers •Lower Engagement Rates •Lower brand Image (ie That Site Sux)
  • 10. Make Sure Basic Responsiveness Works • The viewport as a whole needs to scale. In short, horizontal scrollbars are not your friend. No matter how small the viewport might get, no horizontal scrollbar should appear.
  • 11. Make Sure Basic Responsiveness Works • Things shouldn’t get cut off unpredictably. Don’t put hard limits on certain block widths or texts. Always find a way to make things scale, crop, or predict how they will cut off, and then make them look right.
  • 12. Make Sure Basic Responsiveness Works • Don’t wrap menus. The hamburger icons, although controversial, are a nice trick to make menus look good on most devices. Alternatively, use shorter menus altogether.
  • 13. Make Sure Basic Responsiveness Works • Make the images fit. If you ever get surprised by a horizontal scrollbar, it’s most likely due to an image not scaling properly. Making your images responsive is a must-do for every web design project.
  • 14. Make your design “content-first” •Remove what’s unimportant as the screen gets smaller •The key to intelligent responsive design is predicting what parts of the page become unimportant as the viewport gets smaller. •Stating Mobile 1st makes this exercise easier
  • 15. • 60% of adults use at least 2 devices every day, while 40% have changed device through an activity • http://bit.ly/22jCR95
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. What is Adaptive? • Uses Server-Side Device Detection • WURFL • Separate Site • Usually m.<domain>.com • Requires maintaining 2 Code Bases • In Theory You Can Make a ‘mobile’ optimized version • In Reality A PITA • Often 3rd party solution that scraped full site for content
  • 21. Assuming User Needs • You Can Determine User Expectations Based on Device • Reality Most Mobile Activity Occurs on a Couch or Lean Back Scenario
  • 22. Assuming User Needs “I think the key is not to assume anything. We don’t really know what our users have come to look at. So, we can’t say, “Oh, it’s okay. This person is on a mobile, so we’re going to cut out a load of the content so they can’t reach it.” John Cleveley BBC News http://responsivewebdesign.com/podcast/bbc.html
  • 23. “this unspoken agreement to pretend that we had a certain size. And that size changed over the years. For a while, we all sort of tacitly agreed that 640 by 480 was the right size, and then later than changed to 800:600, and 1024; we seem to have settled on this 960 pixel as being this like, default. It’s still unknown. We still don’t know the size of the browser; it’s just like this consensual hallucination that we’ve all agreed to participate in: “Let’s assume the browser has a browser width of at least 960 pixels.” Jeremy Keith bit.ly/1bhH6rw
  • 24. “The emergence of ideas like “responsive design” and “future-friendly thinking” are in part a response to the collective realization that designing products that solve one problem in one context at a time is no longer sustainable. By refocusing our process on systems that are explicitly designed to adapt to a changing environment, we have an opportunity to develop durable, long-lasting designs that renew their usefulness and value over time.” Wilson Miner bit.ly/1fbq5lB
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. “Any attempt to draw a line around a particular device class has as much permanence as a literal line in the sand. Pause for a moment and the line blurs. Look away and it will be gone. Let’s take the absolute best case scenario. You’re building a web app for internal users for whom you get to specify what computer is purchased and used. You can specify the browser, the monitor size, keyboard, etc.” Jason Grigsby bit.ly/KzJH9G
  • 31. “How long do you think that hardware will be able to be found? Three years from now when a computer dies and has to be replaced, what are the chances that the new monitor will be a touchscreen? By making a decision to design solely for a “desktop UI”, you are creating technical debt and limiting the longevity of the app you’re building. You’re designing to a collective hallucination. You don’t have to have a crystal ball to see where things are headed. And once you start accepting the reality that the lines inside form factors are as blurry as the lines between them, then responsiveness becomes a necessity.” Jason Grigsby bit.ly/KzJH9G
  • 32. Responsive Web Design • Introduced by Ethan Marcotte 2010 - bit.ly/178an9e • Web Design Approach To Create An Optimal Viewing Experience Across All Browser ViewPorts • Fluid Layouts • Media Queries • Minimal if any JavaScript Required
  • 33. Mobile First • Determine The Most Important Information • Expand From There • Start Responsive Design Mobile First • You will be doing yourself a favor • Code is much easier to write and maintain
  • 34. Fluid Layout •Stretch as the Browser ViewPort Changes •Browser’s Viewable Area Inside the Chrome •Serve as the Foundation for the Web Application Layout •Great Way To Create Native Like Experience
  • 35.
  • 36. Media Queries @media (min-width: 600px) { /* Selectors & Rules */ } @media (min-width: 820px) { /* Selectors & Rules */ } @media (min-width: 1080px) { /* Selectors & Rules */ }
  • 37. Responsive Navigation •Use Media Queries to Optimize Rendering •Show and Hide Content Based on ViewPort Dimensions •Create A Mobile Friendly View •Optimize for Large Screens Without Device Detection
  • 39. Resize the Browser Start Small & Increase Viewport
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Chrome Device Mode • https://developers.google.com/web/tools/chrome- devtools/iterate/device-mode/
  • 46. Chrome Device Mode • Emulate your site across different screen sizes and resolutions, including Retina displays. • Responsively design by visualizing and inspecting CSS media queries. • Evaluate your site’s performance using the network emulator, without affecting traffic to other tabs.
  • 47. Chrome Device Mode • Set the Viewport • Manually using the responsive option • Allows you to freely test and plan for unknown devices • Or Chose A Specific Device • Allows you to see current popular device rendering experiences
  • 48. Chrome Device Mode Presets • Sets the correct "User Agent" (UA) string. • Sets the device resolution and DPI (device pixel ratio). • Emulates touch events (if applicable). • Emulates mobile scrollbar overlays and meta viewport. • Autosizes (boosts) text for pages without a defined viewport.
  • 49. Chrome Device Emulation Toggle States & Orientation • Default browser UI • With Chrome navigation bar • With opened keyboard
  • 50.
  • 51. matchMedia •Allows You To Bind JavaScript Callbacks to MediaQuery Breakpoints •Available in All Modern Browsers (IE 10+) •Eliminated Need to Bind to Resize Event
  • 52. matchMedia window.matchMedia("(min-width: 400px)").addListener(function (e) { if(e.matches) { console.info("the view port is at least 400 pixels wide"); }else{ console.info("the view port is not at least 400 pixels wide"); } });