SlideShare a Scribd company logo
1 of 33
Download to read offline
Pragmatic
Responsive
Web Design
From /John Tsevdos @tsevdos
Hi I'm John and I'm social...
tsevdos.com
phrappe.com
@tsevdos
github.com/tsevdos
linkedin.com/in/tsevdosjohn
Responsive Web Design
why?
how?
tips and techniques
Why responsive?
and not native
and not mobile site
Because with a
responsive web site we
provide support
for all devices, including tablets, phones and tvs
for all screen sizes
for all browsers
and because we love the "one site to rule them all"
attitude
Responsive web design
principles
flexible layout (grid)
media queries
flexible media (images, videos, etc.)
Being pragmatic
think different
support as many devices/browsers your budget
allows
solve problems with simple solutions
First things first
think out of the box, think responsivly
forget pixel-perfection
layout (wireframe it)
forget colors, images, logos etc.
prototype it (browser-ready protype)
Mobile first
mobile first content?
mobile first styles
Question : why mobile first?
Set your major and minor
break points
the first break point is the no "break point"
primary (mobile first) styles
set break points where your content needs
adjusting
phones (320/480)
tablets (768/1024)
(small) desktop (1024)
(large) desktop (1200 and over)
Set your major and minor
break points
@media only screen and (min-width:480px) {
}
@media only screen and (min-width:768px) {
}
@media only screen and (min-width:1024px) {
}
@media only screen and (min-width:1200px) {
}
Question : does it make sense to
create a break point (and make
adjustments) for every known
device?
CSS : Flexible layout
The % way
do the right math (target ÷ context = result)
flexible margin / paddings
tip: use % for fonts as well
#container { width:100%; max-width:1200px; }
#main { float:left; width:75%; } /* 900 / 1200 */
#sidebar { float:right; width:25%; } /* 300 / 1200*/
#main { float:left; width:71.666666%; /* 860 / 1200 */ padding:1.666666
%; /* 20 / 1200 */ }
CSS : Flexible layout
The em way
same as above, but with ems
how much is 1em?
tip: use ems for fonts as well
1em = 100% from 16px = 16px
1.5em = 150% from 16px = 24px
0.5em = 50% from 16px = 8px
CSS : Flexible media
img { max-width:100%; }
img, object, embed, video { max-width:100%; }
img { max-width:100%; height:auto !important; /* just in case, to force
correct aspect ratio */ }
img { -ms-interpolation-mode: bicubic; } /* IE scaling fix */
fluid images from unstoppable robot ninja post
fitvids.js
CSS : The rest
set a good base (typography, colors, helpers, etc.)
use CSS preprocessors (SASS, LESS, etc.)
normalize
Markup
use HTML5
take control
be nice to IE6-8
use or
<meta name="viewport" content="width=device-width, initial-sca
le=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=
1">
html5shiv modernizr
respond.js
Markup
Easy mobile-friendly enchantments
Tel:
SMS:
iPhone/iPad icon:
<a href="tel:+306948123456">+306948123456</a>
<a href="sms:+306948123456">+306948123456</a>
<link rel="apple-touch-icon" sizes="57x57" href="touch-icon-iphone-114
.png" />
Markup
Easy mobile-friendly inputs
<!-- Default Keyboard -->
<input type="text" />
<!-- Numeric Keyboard -->
<input type="number" />
<!-- Pattern Keyboard -->
<input pattern="[0-9]*" type="text" />
<!-- Number Keyboard -->
<input type="tel" />
<!-- URL Keyboard -->
<input type="url" />
<!-- e-mail Keyboard -->
<input type="email" />
Responsive web design is
great, but you'll need
more
unobtrusive javascript
feature detection
enrich touch devices (tablets/mobiles)
navigation
touch events (on image galleries, etc.)
geolocation
modernizr
Hand-code or
frameworks
that's a tough one, it depends
budget
time
project scale
Responsive web design
frameworks
Bootstrap
Foundation
Responsive web design
patterns
(all images are from
the post)
Multi-Device Layout Patterns
Mostly fluid
Column drop
Layout shifter
Tiny tweaks
Off canvas
Responsive web design
patterns
Responsive Patterns
Toolbox
text editor / IDE
Chrome / Firefox
iPad
iPhone
Adobe Edge Inspect
Testing
don't rely on emulators and other desktop tools
try to test to as many devices / browsers / OS you
can
you're not magician, it may not work on your mum's
mobile...
Thank you
Questions ?

More Related Content

Similar to Pragmatic Responsive Web Design

Similar to Pragmatic Responsive Web Design (20)

Spectrum 2015 responsive design
Spectrum 2015   responsive designSpectrum 2015   responsive design
Spectrum 2015 responsive design
 
HTML5 apps for iOS (and probably beyond)
HTML5 apps for iOS (and probably beyond)HTML5 apps for iOS (and probably beyond)
HTML5 apps for iOS (and probably beyond)
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
 
Lavacon 2014 responsive design in your hat
Lavacon 2014   responsive design in your hatLavacon 2014   responsive design in your hat
Lavacon 2014 responsive design in your hat
 
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
Spectrum 16   pmc 16 - preparing legacy projects for responsive designSpectrum 16   pmc 16 - preparing legacy projects for responsive design
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
 
Responsive design and retina displays
Responsive design and retina displaysResponsive design and retina displays
Responsive design and retina displays
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Designing responsive web design in FIGMA
Designing responsive web design in FIGMADesigning responsive web design in FIGMA
Designing responsive web design in FIGMA
 
Mobile applications chapter 3
Mobile applications chapter 3Mobile applications chapter 3
Mobile applications chapter 3
 
Responding Responsively
Responding ResponsivelyResponding Responsively
Responding Responsively
 
Responsive Design in WordPress
Responsive Design in WordPressResponsive Design in WordPress
Responsive Design in WordPress
 
mLearnCon 2014 - A responsive web solution for a complex online educational p...
mLearnCon 2014 - A responsive web solution for a complex online educational p...mLearnCon 2014 - A responsive web solution for a complex online educational p...
mLearnCon 2014 - A responsive web solution for a complex online educational p...
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
Responsive web design tutorial simple easy
Responsive web design tutorial simple easyResponsive web design tutorial simple easy
Responsive web design tutorial simple easy
 
Responsive web design_part_1
Responsive web design_part_1Responsive web design_part_1
Responsive web design_part_1
 

Recently uploaded

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)

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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Pragmatic Responsive Web Design

  • 2. Hi I'm John and I'm social... tsevdos.com phrappe.com @tsevdos github.com/tsevdos linkedin.com/in/tsevdosjohn
  • 4. Why responsive? and not native and not mobile site
  • 5. Because with a responsive web site we provide support for all devices, including tablets, phones and tvs for all screen sizes for all browsers and because we love the "one site to rule them all" attitude
  • 6. Responsive web design principles flexible layout (grid) media queries flexible media (images, videos, etc.)
  • 7. Being pragmatic think different support as many devices/browsers your budget allows solve problems with simple solutions
  • 8. First things first think out of the box, think responsivly forget pixel-perfection layout (wireframe it) forget colors, images, logos etc. prototype it (browser-ready protype)
  • 9. Mobile first mobile first content? mobile first styles Question : why mobile first?
  • 10. Set your major and minor break points the first break point is the no "break point" primary (mobile first) styles set break points where your content needs adjusting phones (320/480) tablets (768/1024) (small) desktop (1024) (large) desktop (1200 and over)
  • 11. Set your major and minor break points @media only screen and (min-width:480px) { } @media only screen and (min-width:768px) { } @media only screen and (min-width:1024px) { } @media only screen and (min-width:1200px) { }
  • 12. Question : does it make sense to create a break point (and make adjustments) for every known device?
  • 13. CSS : Flexible layout The % way do the right math (target ÷ context = result) flexible margin / paddings tip: use % for fonts as well #container { width:100%; max-width:1200px; } #main { float:left; width:75%; } /* 900 / 1200 */ #sidebar { float:right; width:25%; } /* 300 / 1200*/ #main { float:left; width:71.666666%; /* 860 / 1200 */ padding:1.666666 %; /* 20 / 1200 */ }
  • 14. CSS : Flexible layout The em way same as above, but with ems how much is 1em? tip: use ems for fonts as well 1em = 100% from 16px = 16px 1.5em = 150% from 16px = 24px 0.5em = 50% from 16px = 8px
  • 15. CSS : Flexible media img { max-width:100%; } img, object, embed, video { max-width:100%; } img { max-width:100%; height:auto !important; /* just in case, to force correct aspect ratio */ } img { -ms-interpolation-mode: bicubic; } /* IE scaling fix */ fluid images from unstoppable robot ninja post fitvids.js
  • 16. CSS : The rest set a good base (typography, colors, helpers, etc.) use CSS preprocessors (SASS, LESS, etc.) normalize
  • 17. Markup use HTML5 take control be nice to IE6-8 use or <meta name="viewport" content="width=device-width, initial-sca le=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome= 1"> html5shiv modernizr respond.js
  • 18. Markup Easy mobile-friendly enchantments Tel: SMS: iPhone/iPad icon: <a href="tel:+306948123456">+306948123456</a> <a href="sms:+306948123456">+306948123456</a> <link rel="apple-touch-icon" sizes="57x57" href="touch-icon-iphone-114 .png" />
  • 19. Markup Easy mobile-friendly inputs <!-- Default Keyboard --> <input type="text" /> <!-- Numeric Keyboard --> <input type="number" /> <!-- Pattern Keyboard --> <input pattern="[0-9]*" type="text" /> <!-- Number Keyboard --> <input type="tel" /> <!-- URL Keyboard --> <input type="url" /> <!-- e-mail Keyboard --> <input type="email" />
  • 20. Responsive web design is great, but you'll need more unobtrusive javascript feature detection enrich touch devices (tablets/mobiles) navigation touch events (on image galleries, etc.) geolocation modernizr
  • 21. Hand-code or frameworks that's a tough one, it depends budget time project scale
  • 23. Responsive web design patterns (all images are from the post) Multi-Device Layout Patterns
  • 30. Toolbox text editor / IDE Chrome / Firefox iPad iPhone Adobe Edge Inspect
  • 31. Testing don't rely on emulators and other desktop tools try to test to as many devices / browsers / OS you can you're not magician, it may not work on your mum's mobile...