SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Responsive Web
Design & Development




                   John Fitzgerald
Overview

What is Responsive Web Design

Benefits of adoption

Challenges of adoption

Responsive methods (The Technical Part)

Helper Tools
What is RWD?


A method of building web views which
adapt to the display of the device on
which they are viewed
Benefits of Building
       Responsively
Allows the development of a consolidated front-
end codebase for use on all devices

Improves maintainability of codebase

Reduces frequency of app submissions and allows
apps to be updated transparently, without forcing
users to download from iTunes or Android
Marketplace

Reduces expense of maintaining separate teams
to maintain codebases for different devices
The Challenges of
          Becoming Responsive
       More thought must go into designs

       Designer and developer learning curve

       Responsive views take more time to build than
       fixed views*

       Responsive views require more testing than fixed
       views*

* but not more than 3 separate views.
Responsive Methods
Reset CSS

Percentage Widths

Responsive Font Sizing

Responsive Image Sizing

Viewport Control

CSS Media Queries
Reset CSS
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    text-decoration:none;
    list-style:none;
}
Percentage Widths
The Most Important
   Equation in the
Responsive Web World
TARGET / CONTEXT = RESULT
Typical % Calculation
  445px / 898px = 0.495545657
Commenting % Widths
#header #btn-homepage{
    position:absolute;
    width:16.17977528%;   /*   144 / 890   */
    min-width: 100px;
    bottom:20px;
    right:0;
}
Hazards of Percentages
Margin:
Calculated based on width of parent of the
element to which they’re assigned.

Padding:
Calculated based on the width of the element to
which they’re assigned.
Responsive Font Sizing

em units rather than pixels
Default font size in browsers: 16 pixels
Responsive Images
Responsive Images	
max-width: 100%;

Constrains image width to a maximum of the size
of the containing element

Supported in all modern browsers

Images sized in this way are downloaded at native
size, even if displayed at far smaller scale.

Background images and sprites have limited
usefulness in responsive web design, due to
currently-supported browser feature-sets.
Viewport Control
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes"/>

  Property        Description
                  Width of the viewport in pixels (or device-width).
    width
                  If width isn’t set, it defaults to a desktop size (980px on mobile Safari).
                  Height of the viewport in pixels (or device-height).
   height
                  Generally you don’t need to worry about setting this property.
                  (0 to 10.0) Multiplier that sets the scale of the page after its initial display.
 initial-scale    Safe bet: if you need to set it, set it to 1.0.
                  Larger values = zoomed in, smaller values = zoomed out

 minimum-         (0 to 10.0) The minimum multiplier the user can “zoom out” to.
   scale          Defaults to 0.25 on mobile Safari.

 maximum-         (0 to 10.0) The minimum multiplier the user can “zoom in” to.
   scale          Defaults to 1.6 on mobile Safari.

              (yes/no) Whether to allow a user from scaling in/out (zooming in/out).
user-scalable
              Default to “yes” on mobile Safari.
CSS Media Queries
 Two ways to use media queries:
<link rel="stylesheet" href="screen.css"
media="screen and (min-width: 1024px)" /
>
@media screen and (min-width: 1024px) {}

 The logical “and” can be used to join multiple
 queries
@media screen and (min-width: 1024px)
and (max-width: 1228px) {}
Media Query Features
Media queries test for the existence or extent of
device features to conditionally load CSS or apply
styles.

“Rendering Surface” is the device’s entire screen.

“Display Area” is the browser window on the
device.
HAS min- AND
FEATURE                                           DEFINITION
                                                                                                  max- PREFIXES
    width        The width of the display area                                                         YES
    height       The height of the display area                                                        YES
 device-width    The width of the device’s rendering surface                                           YES
device-height    The Height of the device’s rendering surface                                          YES
  orientation    Accepts portrait or landscape value                                                   NO
                 Ratio of the display area’s width over its height. For example: on a desktop,
 aspect-ratio                                                                                          YES
                 you’d be able to query if the browser window is at a 16:9 aspect ratio.

device-aspect-   Ratio of the device’s rendering surface width over its height. For example: on
                                                                                                       YES
     ratio       a desktop, you’d be able to query if the screen is at a 16:9 aspect ratio.

                 The number of bits per color component of the device. For example, an 8-bit
    color        color device would successfully pass a query of (color: 8). Non-color devices         YES
                 should return a value of 0.
                 The number of entries in the color lookup table of the output device. For
 color-index                                                                                           YES
                 example, @media screen and (min-color-index: 256).

                 The number of bits per pixel on a monochrome device If the device is not a
monochrome                                                                                             YES
                 monochrome device, the output device value will be 0.

                 Tests the density of the pixels in the device, such as:
  resolution                                                                                           YES
                  screen and (resolution: 72dpi) or screen and (max-resolution: 300dpi).

                 For tv-based browsing, measures whether the scanning process is either
     scan                                                                                              NO
                 progressive or scan.

                 Tests whether the device is a grid-based display, like feature phones with one
     grid                                                                                              NO
                 fixed-width font. Can be expressed simply as (grid).
Device-specific Queries
/* Smartphones (portrait and landscape) */   /* iPads (portrait) */
@media only screen                           @media only screen
and (min-device-width : 320px)               and (min-device-width : 768px)
and (max-device-width : 480px) {             and (max-device-width : 1024px)
/* Styles */                                 and (orientation : portrait) {
}                                            /* Styles */
                                             }
/* Smartphones (landscape) */
@media only screen                           /* Desktops and laptops */
and (min-width : 321px) {                    @media only screen
/* Styles */                                 and (min-width : 1224px) {
}                                            /* Styles */
                                             }
/* Smartphones (portrait) */
@media only screen                           /* Large screens */
and (max-width : 320px) {                    @media only screen
/* Styles */                                 and (min-width : 1824px) {
}                                            /* Styles */
                                             }
/* iPads (portrait and landscape) */
@media only screen                           /* iPhone 4 */
and (min-device-width : 768px)               @media
and (max-device-width : 1024px) {            only screen and (-webkit-min-device-pixel-ratio :
/* Styles */                                 1.5),
}                                            only screen and (min-device-pixel-ratio : 1.5) {
                                             /* Styles */
/* iPads (landscape) ----------- */          }
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Styles */
}
Helper Tools
Modernizr:
A JavaScript Library which allows web views
which take advantage of less-fully supported
features to display properly on older browsers.
modernizr.com

Skeleton:
A library of JavaScript and CSS files meant to
allow fast creation of responsive web views.
getskeleton.com
Final Thoughts
To achieve the best results, front-end devs and
designers should collaborate when creating
responsive mocks/templates.

Responsiveness is a mindset. When approaching
a new view, resist the urge to lock things down
and, instead, think fluidly.

Responsive Web Design is evolving as standards
and browser adoption of those standards change.

There is no substitute for looking at a view on the
devices on which users will be viewing it.
?’s

Weitere ähnliche Inhalte

Ähnlich wie Responsive Web Design & Development

Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobileDee Sadler
 
Presentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designPresentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designWPMallorca
 
Web 3.0 - Concepts, Technologies, and Evolving Business Models
Web 3.0 - Concepts, Technologies, and Evolving Business ModelsWeb 3.0 - Concepts, Technologies, and Evolving Business Models
Web 3.0 - Concepts, Technologies, and Evolving Business Modelscghollins
 
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudWebinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudInternap
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And NextChanny Yun
 
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric WautersDynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wautersdynamicscom
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptOpenSourceIndia
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptsuniltomar04
 
Mobile Cloud Architectures
Mobile Cloud ArchitecturesMobile Cloud Architectures
Mobile Cloud ArchitecturesDavid Coallier
 
Designing for Inclusion with Media Queries
Designing for Inclusion with Media QueriesDesigning for Inclusion with Media Queries
Designing for Inclusion with Media QueriesEric Bailey
 
A short introduction to the cloud
A short introduction to the cloudA short introduction to the cloud
A short introduction to the cloudLaurent Eschenauer
 
Yacht Charter Reservation August 2009
Yacht Charter Reservation August 2009Yacht Charter Reservation August 2009
Yacht Charter Reservation August 2009Latitude 26
 
Vineet Choudhry Portfolio
Vineet Choudhry PortfolioVineet Choudhry Portfolio
Vineet Choudhry PortfolioRakesh Ranjan
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2dejavee
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
Operating systems 1
Operating systems 1Operating systems 1
Operating systems 1JoshuaIgo
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screensAbhijeet Dutta
 

Ähnlich wie Responsive Web Design & Development (20)

Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobile
 
Presentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designPresentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive design
 
Web 3.0 - Concepts, Technologies, and Evolving Business Models
Web 3.0 - Concepts, Technologies, and Evolving Business ModelsWeb 3.0 - Concepts, Technologies, and Evolving Business Models
Web 3.0 - Concepts, Technologies, and Evolving Business Models
 
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudWebinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And Next
 
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric WautersDynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
Ubiquisys at Femtocells Americas 11
Ubiquisys at Femtocells Americas 11Ubiquisys at Femtocells Americas 11
Ubiquisys at Femtocells Americas 11
 
Mobile Cloud Architectures
Mobile Cloud ArchitecturesMobile Cloud Architectures
Mobile Cloud Architectures
 
Designing for Inclusion with Media Queries
Designing for Inclusion with Media QueriesDesigning for Inclusion with Media Queries
Designing for Inclusion with Media Queries
 
A short introduction to the cloud
A short introduction to the cloudA short introduction to the cloud
A short introduction to the cloud
 
Yacht Charter Reservation August 2009
Yacht Charter Reservation August 2009Yacht Charter Reservation August 2009
Yacht Charter Reservation August 2009
 
Vineet Choudhry Portfolio
Vineet Choudhry PortfolioVineet Choudhry Portfolio
Vineet Choudhry Portfolio
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
About Anewtech Systems
About Anewtech SystemsAbout Anewtech Systems
About Anewtech Systems
 
Operating systems 1
Operating systems 1Operating systems 1
Operating systems 1
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screens
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 DevelopmentsTrustArc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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 AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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 WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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...Drew Madelung
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Responsive Web Design & Development

  • 1. Responsive Web Design & Development John Fitzgerald
  • 2. Overview What is Responsive Web Design Benefits of adoption Challenges of adoption Responsive methods (The Technical Part) Helper Tools
  • 3. What is RWD? A method of building web views which adapt to the display of the device on which they are viewed
  • 4. Benefits of Building Responsively Allows the development of a consolidated front- end codebase for use on all devices Improves maintainability of codebase Reduces frequency of app submissions and allows apps to be updated transparently, without forcing users to download from iTunes or Android Marketplace Reduces expense of maintaining separate teams to maintain codebases for different devices
  • 5. The Challenges of Becoming Responsive More thought must go into designs Designer and developer learning curve Responsive views take more time to build than fixed views* Responsive views require more testing than fixed views* * but not more than 3 separate views.
  • 6. Responsive Methods Reset CSS Percentage Widths Responsive Font Sizing Responsive Image Sizing Viewport Control CSS Media Queries
  • 7. Reset CSS html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; text-decoration:none; list-style:none; }
  • 9. The Most Important Equation in the Responsive Web World TARGET / CONTEXT = RESULT
  • 10. Typical % Calculation 445px / 898px = 0.495545657
  • 11. Commenting % Widths #header #btn-homepage{ position:absolute; width:16.17977528%; /* 144 / 890 */ min-width: 100px; bottom:20px; right:0; }
  • 12. Hazards of Percentages Margin: Calculated based on width of parent of the element to which they’re assigned. Padding: Calculated based on the width of the element to which they’re assigned.
  • 13. Responsive Font Sizing em units rather than pixels Default font size in browsers: 16 pixels
  • 15. Responsive Images max-width: 100%; Constrains image width to a maximum of the size of the containing element Supported in all modern browsers Images sized in this way are downloaded at native size, even if displayed at far smaller scale. Background images and sprites have limited usefulness in responsive web design, due to currently-supported browser feature-sets.
  • 16. Viewport Control <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes"/> Property Description Width of the viewport in pixels (or device-width). width If width isn’t set, it defaults to a desktop size (980px on mobile Safari). Height of the viewport in pixels (or device-height). height Generally you don’t need to worry about setting this property. (0 to 10.0) Multiplier that sets the scale of the page after its initial display. initial-scale Safe bet: if you need to set it, set it to 1.0. Larger values = zoomed in, smaller values = zoomed out minimum- (0 to 10.0) The minimum multiplier the user can “zoom out” to. scale Defaults to 0.25 on mobile Safari. maximum- (0 to 10.0) The minimum multiplier the user can “zoom in” to. scale Defaults to 1.6 on mobile Safari. (yes/no) Whether to allow a user from scaling in/out (zooming in/out). user-scalable Default to “yes” on mobile Safari.
  • 17. CSS Media Queries Two ways to use media queries: <link rel="stylesheet" href="screen.css" media="screen and (min-width: 1024px)" / > @media screen and (min-width: 1024px) {} The logical “and” can be used to join multiple queries @media screen and (min-width: 1024px) and (max-width: 1228px) {}
  • 18. Media Query Features Media queries test for the existence or extent of device features to conditionally load CSS or apply styles. “Rendering Surface” is the device’s entire screen. “Display Area” is the browser window on the device.
  • 19. HAS min- AND FEATURE DEFINITION max- PREFIXES width The width of the display area YES height The height of the display area YES device-width The width of the device’s rendering surface YES device-height The Height of the device’s rendering surface YES orientation Accepts portrait or landscape value NO Ratio of the display area’s width over its height. For example: on a desktop, aspect-ratio YES you’d be able to query if the browser window is at a 16:9 aspect ratio. device-aspect- Ratio of the device’s rendering surface width over its height. For example: on YES ratio a desktop, you’d be able to query if the screen is at a 16:9 aspect ratio. The number of bits per color component of the device. For example, an 8-bit color color device would successfully pass a query of (color: 8). Non-color devices YES should return a value of 0. The number of entries in the color lookup table of the output device. For color-index YES example, @media screen and (min-color-index: 256). The number of bits per pixel on a monochrome device If the device is not a monochrome YES monochrome device, the output device value will be 0. Tests the density of the pixels in the device, such as: resolution YES screen and (resolution: 72dpi) or screen and (max-resolution: 300dpi). For tv-based browsing, measures whether the scanning process is either scan NO progressive or scan. Tests whether the device is a grid-based display, like feature phones with one grid NO fixed-width font. Can be expressed simply as (grid).
  • 20. Device-specific Queries /* Smartphones (portrait and landscape) */ /* iPads (portrait) */ @media only screen @media only screen and (min-device-width : 320px) and (min-device-width : 768px) and (max-device-width : 480px) { and (max-device-width : 1024px) /* Styles */ and (orientation : portrait) { } /* Styles */ } /* Smartphones (landscape) */ @media only screen /* Desktops and laptops */ and (min-width : 321px) { @media only screen /* Styles */ and (min-width : 1224px) { } /* Styles */ } /* Smartphones (portrait) */ @media only screen /* Large screens */ and (max-width : 320px) { @media only screen /* Styles */ and (min-width : 1824px) { } /* Styles */ } /* iPads (portrait and landscape) */ @media only screen /* iPhone 4 */ and (min-device-width : 768px) @media and (max-device-width : 1024px) { only screen and (-webkit-min-device-pixel-ratio : /* Styles */ 1.5), } only screen and (min-device-pixel-ratio : 1.5) { /* Styles */ /* iPads (landscape) ----------- */ } @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { /* Styles */ }
  • 21. Helper Tools Modernizr: A JavaScript Library which allows web views which take advantage of less-fully supported features to display properly on older browsers. modernizr.com Skeleton: A library of JavaScript and CSS files meant to allow fast creation of responsive web views. getskeleton.com
  • 22. Final Thoughts To achieve the best results, front-end devs and designers should collaborate when creating responsive mocks/templates. Responsiveness is a mindset. When approaching a new view, resist the urge to lock things down and, instead, think fluidly. Responsive Web Design is evolving as standards and browser adoption of those standards change. There is no substitute for looking at a view on the devices on which users will be viewing it.
  • 23. ?’s

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n