SlideShare a Scribd company logo
1 of 39
Download to read offline
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
спасибо:)

More Related Content

Similar to Joanna chwastowska responsive layout - droid con

Responsive web design
Responsive web designResponsive web design
Responsive web designpsophy
 
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 #BigD12touchtitans
 
Responsive web design
Responsive web designResponsive web design
Responsive web designBen MacNeill
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive DesignValtech UK
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignCory Webb
 
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 Mobilepeychevi
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Tirthesh Ganatra
 
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 experienceZoe Gillenwater
 
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
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesiabrucelawson
 
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...Andreas Bovens
 
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 MinutesRachel Chartoff
 
Building Responsive Websites with Drupal
Building Responsive Websites with DrupalBuilding Responsive Websites with Drupal
Building Responsive Websites with DrupalSuzanne Dergacheva
 
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 2012Suzanne Dergacheva
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"IT Event
 

Similar to 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"
 

More from 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, momentaapps4allru
 
Philipp kandal droidcon futureoflbs
Philipp kandal   droidcon futureoflbsPhilipp kandal   droidcon futureoflbs
Philipp kandal droidcon futureoflbsapps4allru
 
Messerschmidt, tim
Messerschmidt, timMesserschmidt, tim
Messerschmidt, timapps4allru
 
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineauapps4allru
 
писаревский алексей
писаревский алексейписаревский алексей
писаревский алексей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 androidapps4allru
 
зиновьев алексей 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
 

More from 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 ...
 
артем демьянов
артем демьяновартем демьянов
артем демьянов
 
резников дмитрий
резников дмитрийрезников дмитрий
резников дмитрий
 
михаил дударев
михаил дударевмихаил дударев
михаил дударев
 
Георгий Яковлев
Георгий ЯковлевГеоргий Яковлев
Георгий Яковлев
 
Алексей Исайченко
Алексей ИсайченкоАлексей Исайченко
Алексей Исайченко
 
митякин вадим
митякин вадиммитякин вадим
митякин вадим
 

Recently uploaded

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
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...panagenda
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
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.pdfkalichargn70th171
 
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 🔝✔️✔️Delhi Call girls
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
+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
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
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
 
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 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
+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...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

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