SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Responsive layout
Joanna Chwastowska, Google
● Why
● What
● How
Mobile specific webpage
● maintenance cost
● detecting/redirecting by user agent
● sometimes worth it
● ‘view desktop version’
Viewport
● virtual "window"
● usually wider than the screen
● prevent “squeezing”
● users pan and zoom
Viewport
● usually wider than the screen
● zoom-in for the user
<meta name="viewport"
content="width=device-width,
initial-scale=1,
minimum-scale=1">
Best practices for the new world
● all pages should render legibly on mobile
● write content once, view anywhere
● never show horizontal bar (almost never;)
Liquid layout
Liquid layout
● ability to reflow itself on narrow screen
● never use fixed width/height on containers
● body { max-width: 978px; }
.boxout { min-height: 200px; }
Columns
Columns
● use % for columns width
.column {
float: left;
margin-right: 2%;
width: 32%;
}
.column.last { margin-right: 0; }
Scrollbar
Scrollbar
● avoid horizontal scrollbar
● sometimes images / other elements may
clog up otherwise liquid layout
img, iframe {
max-width: 100%;
box-sizing: border-box;
}
Preserve layout
● always check your content on narrow screen
● make content ‘behave’ by hiding the overflow
.container { overflow: hidden; }
Preserve layout
Media queries
● different use cases for desktop, mobile, and
print
● browser support
● only styles that differ
@media screen and (max-width: 600px) {
/* rules for narrower viewports */
}
● 978px – desktop and large tablets
maximum page width; allow full layout and
content
● 600px – tablets
Kindle Fire and other 7” tablets; adopt two-column
layout and drop non-critical content
● 480px – smartphones
one-column layout and mobile specific navigation
Linearize content
Linearize contents
● narrow columns very hard to read
● will not work on IE8 and below
@media screen and (max-width: 480px) {
div, li {
display: block;
float: none;
width: 100%;
}
}
Navigation
Navigation
● increase hit area, minimum hit area 44px²
● no margins, increase padding, linearize
@media screen and (max-width: 480px) {
#nav a {
display: block;
padding: 5px 10px;
}
}
Optional content
Optional content
● useful? usable?
● dataplans
@media screen and (max-width: 480px) {
.optional {
display: none; /* not visibility:hidden !*/
}
}
References
● Selected visuals and tips&tricks thanks to Rupert
Breheny, Web Master @ Google
● Responsive web design
● Fluid images
● Box sizing CSS property
● Column layout module
● Liquid layout walkthrough
● Mobile First tech talk
● Jeremy Keith - One Web
спасибо:)

Contenu connexe

Similaire à Joanna chwastowska responsive layout - droid con

Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
touchtitans
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 
Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobile
peychevi
 
Responsive Web Design On Student's day
Responsive Web Design On Student's day Responsive Web Design On Student's day
Responsive Web Design On Student's day
psophy
 

Similaire à Joanna chwastowska responsive layout - droid con (20)

Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive Design
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobile
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)
 
CSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceCSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experience
 
Dig into the omega theme
Dig into the omega themeDig into the omega theme
Dig into the omega theme
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Web Design On Student's day
Responsive Web Design On Student's day Responsive Web Design On Student's day
Responsive Web Design On Student's day
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesia
 
Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...
 
Retro Responsive: From Fixed-Width to Flexible in 55 Minutes
Retro Responsive: From Fixed-Width to Flexible in 55 MinutesRetro Responsive: From Fixed-Width to Flexible in 55 Minutes
Retro Responsive: From Fixed-Width to Flexible in 55 Minutes
 
Building Responsive Websites with Drupal
Building Responsive Websites with DrupalBuilding Responsive Websites with Drupal
Building Responsive Websites with Drupal
 
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"
 

Plus de apps4allru

демьянов олег Wa особенности разработки детских приложений - практические с...
демьянов олег Wa   особенности разработки детских приложений - практические с...демьянов олег Wa   особенности разработки детских приложений - практические с...
демьянов олег Wa особенности разработки детских приложений - практические с...
apps4allru
 
Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momenta
apps4allru
 
Philipp kandal droidcon futureoflbs
Philipp kandal   droidcon futureoflbsPhilipp kandal   droidcon futureoflbs
Philipp kandal droidcon futureoflbs
apps4allru
 
Messerschmidt, tim
Messerschmidt, timMesserschmidt, tim
Messerschmidt, tim
apps4allru
 
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
apps4allru
 
писаревский алексей
писаревский алексейписаревский алексей
писаревский алексей
apps4allru
 
Mateusz herych content search problem on android
Mateusz herych content search problem on androidMateusz herych content search problem on android
Mateusz herych content search problem on android
apps4allru
 
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
apps4allru
 
артем демьянов
артем демьяновартем демьянов
артем демьянов
apps4allru
 
резников дмитрий
резников дмитрийрезников дмитрий
резников дмитрий
apps4allru
 
михаил дударев
михаил дударевмихаил дударев
михаил дударев
apps4allru
 
Георгий Яковлев
Георгий ЯковлевГеоргий Яковлев
Георгий Яковлев
apps4allru
 
Алексей Исайченко
Алексей ИсайченкоАлексей Исайченко
Алексей Исайченко
apps4allru
 
митякин вадим
митякин вадиммитякин вадим
митякин вадим
apps4allru
 

Plus de apps4allru (15)

Alex negara
Alex negaraAlex negara
Alex negara
 
демьянов олег Wa особенности разработки детских приложений - практические с...
демьянов олег Wa   особенности разработки детских приложений - практические с...демьянов олег Wa   особенности разработки детских приложений - практические с...
демьянов олег Wa особенности разработки детских приложений - практические с...
 
Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momenta
 
Philipp kandal droidcon futureoflbs
Philipp kandal   droidcon futureoflbsPhilipp kandal   droidcon futureoflbs
Philipp kandal droidcon futureoflbs
 
Messerschmidt, tim
Messerschmidt, timMesserschmidt, tim
Messerschmidt, tim
 
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
 
писаревский алексей
писаревский алексейписаревский алексей
писаревский алексей
 
Mateusz herych content search problem on android
Mateusz herych content search problem on androidMateusz herych content search problem on android
Mateusz herych content search problem on android
 
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
 
артем демьянов
артем демьяновартем демьянов
артем демьянов
 
резников дмитрий
резников дмитрийрезников дмитрий
резников дмитрий
 
михаил дударев
михаил дударевмихаил дударев
михаил дударев
 
Георгий Яковлев
Георгий ЯковлевГеоргий Яковлев
Георгий Яковлев
 
Алексей Исайченко
Алексей ИсайченкоАлексей Исайченко
Алексей Исайченко
 
митякин вадим
митякин вадиммитякин вадим
митякин вадим
 

Dernier

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Joanna chwastowska responsive layout - droid con

  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Mobile specific webpage ● maintenance cost ● detecting/redirecting by user agent ● sometimes worth it ● ‘view desktop version’
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Viewport ● virtual "window" ● usually wider than the screen ● prevent “squeezing” ● users pan and zoom
  • 15.
  • 16. Viewport ● usually wider than the screen ● zoom-in for the user <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
  • 17. Best practices for the new world ● all pages should render legibly on mobile ● write content once, view anywhere ● never show horizontal bar (almost never;)
  • 18.
  • 19.
  • 20.
  • 21.
  • 23. Liquid layout ● ability to reflow itself on narrow screen ● never use fixed width/height on containers ● body { max-width: 978px; } .boxout { min-height: 200px; }
  • 25. Columns ● use % for columns width .column { float: left; margin-right: 2%; width: 32%; } .column.last { margin-right: 0; }
  • 27. Scrollbar ● avoid horizontal scrollbar ● sometimes images / other elements may clog up otherwise liquid layout img, iframe { max-width: 100%; box-sizing: border-box; }
  • 29. ● always check your content on narrow screen ● make content ‘behave’ by hiding the overflow .container { overflow: hidden; } Preserve layout
  • 30. Media queries ● different use cases for desktop, mobile, and print ● browser support ● only styles that differ @media screen and (max-width: 600px) { /* rules for narrower viewports */ }
  • 31. ● 978px – desktop and large tablets maximum page width; allow full layout and content ● 600px – tablets Kindle Fire and other 7” tablets; adopt two-column layout and drop non-critical content ● 480px – smartphones one-column layout and mobile specific navigation
  • 33. Linearize contents ● narrow columns very hard to read ● will not work on IE8 and below @media screen and (max-width: 480px) { div, li { display: block; float: none; width: 100%; } }
  • 35. Navigation ● increase hit area, minimum hit area 44px² ● no margins, increase padding, linearize @media screen and (max-width: 480px) { #nav a { display: block; padding: 5px 10px; } }
  • 37. Optional content ● useful? usable? ● dataplans @media screen and (max-width: 480px) { .optional { display: none; /* not visibility:hidden !*/ } }
  • 38. References ● Selected visuals and tips&tricks thanks to Rupert Breheny, Web Master @ Google ● Responsive web design ● Fluid images ● Box sizing CSS property ● Column layout module ● Liquid layout walkthrough ● Mobile First tech talk ● Jeremy Keith - One Web