SlideShare una empresa de Scribd logo
1 de 88
Descargar para leer sin conexión
USING         MEDIA QUERIES
to build Mobile Web Applications
@kevinderudder working for
eGuidelines and a lecturer at the
Technical University of West Flanders.

Contact me on kevin@e-guidelines.be
Website on a desktop   Website on a mobile phone
Agenda



•   Why this topic
•   Native vs Web apps
•   Responsive Design
•   HTML5 and CSS3 to the rescue
•   Usefull HTML5 Tags
•   Media Queries
WHY THIS TOPIC
Photo by http://neuroticworkaholic.blogspot.com
As a web developer you should target
        multiple (all) devices
HOW??
Native vs WEB
Native Development

• Windows Metro Applications
  • XAML with C#, VB.NET or C++
  • HTML with JavaScript


• iOS apps
  • Objective C


• Android
  • Java
HTML5 and CSS3
to the rescue
=   CONTENT




=   UI
HTML5

   Structure    Indexed DB     File APIs     Forms




   Audio and                   History
                Web Workers                   XHR2
     Video                    Navigation

                                                         ...

                              Drag and
    Canvas      WebSockets                 Messaging
                                Drop



                Server-Sent
  Web Storage                  Offline     Geolocation
                  Events
HTML5

   Structure    Indexed DB     File APIs     Forms




   Audio and                   History
                Web Workers                   XHR2
     Video                    Navigation

                                                         ...

                              Drag and
    Canvas      WebSockets                 Messaging
                                Drop



                Server-Sent
  Web Storage                  Offline     Geolocation
                  Events
CSS3


       Rounded                    Colors
                   Box Shadow                  Text Effects
       Corners                   HSL, HSLA




                                Multi-column
       Box Model   Web Fonts                    Borders
                                  layout




        Media                                   Attribute
                   Background    Selectors
        Queries                                 matching
CSS3


       Rounded                    Colors
                   Box Shadow                  Text Effects
       Corners                   HSL, HSLA




                                Multi-column
       Box Model   Web Fonts                    Borders
                                  layout




        Media                                   Attribute
                   Background    Selectors
        Queries                                 matching
Let’s get started and change that MVC site
into a cross platform/device web application
Before you even think about designing

CONTENT IS KING
How do you point to the specific content??
<div id=“header”> <div id=“top” />...
          <div id=“navigation”> <div id=“menu”>...

                                 <div id=“main”>



                               <div class=“content”>
<div id=“left”>



                               <div class=“content”>



                     <div id=“footer”>
<header>
           <nav>

                     <section>



                     <article>
<aside>



                     <article>



          <footer>
<header />         <nav />


                  <article />             <section />


 <aside />




<footer />
<header />


               <nav />


<section />




              <aside />




              <article />
DEMO
<header />         <nav />


                  <article />             <section />


 <aside />




<footer />
Make it MOBILE
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
<script type="text/javascript">

   if (screen.width <= 320) {
       document.location = "m.microsoft.com";
   }

</script>
This is good, if you want to deliver different
                   content
But, do you create a custom experience for
       each (new) browser or device
How are you gonna serve the page to the device
     1. Redirect
     2. Responsive design via Media Queries
What does it mean: RESPONSIVE
Pictures of M. vatia
Pictures of M. vatia
If you want to make your web app responsive, you
should implement 3 ingredients
     • A flexible, grid-based layout
     • Flexible images and media
     • Media Queries
We will only focus on Media Queries
Media Queries allow you write design code
 based on the characteristics of a device
Media Queries exists out of 2 parts

                     MEDIA QUERY

          Type               Query or Expression

  @media all and (max-width: 640px) {

  }
Media Queries exists out of 2 parts
 1. Media Type
 2. Expression
Media Types
Global.css
The media types

                                                             Taken from the W3C site
All          Suitable for all devices
Braille      Intended for braille tactile feedback devices
Embossed     Intended for paged braille printers
Handheld     Intended for handheld devices
Print        Intended for paged material
Projection   Intended for projected presentations
Screen       Intended primarily for color computer screens
Speech       Inteded for speech synthesizers
Tty          Media using a fixed character grid
Tv           Intended for television-type devices
AHA, there is something like handheld
@media screen
{
    body
    {
         background-color: Red;
    }
}

@media handheld
{
    body
    {
         background-color: Yellow;
    }
}

                                     This is not yellow
Old devices didn’t have capable browsers
Modern mobile devices use screen as media type
Media Queries exists out of 2 parts
 1. Media Type
 2. Expression
MEDIA QUERY

     Type            Query or Expression

@media all and (max-width: 640px) {
                   Feature           Value


}
The Features

Features with min- and max- prefixes

•   Width                     •   Aspect-ratio
•   Height                    •   Device-aspect-ratio
•   Device-width              •   Color
•   Device-height             •   Color-index
•   Resolution                •   Monochrome
The Features

Features without min- and max- prefixes
• Orientation
• Scan
• Grid
3 Ways to implement Media Queries


1.




2.



3.
A Media Query
Combine multiple queries
Combine multiple queries
NOT
DEMO
RESOURCES
Thank you
kevin@e-guidelines.be

Más contenido relacionado

Destacado

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
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Stephen Hay
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewportChris Mills
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)Stephen Hay
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Stephen Hay
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oiljameswillweb
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queriesStephen Hay
 
From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to ClarityStephen Hay
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs staticNicole Ryan
 
Beyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBeyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBrad Frost
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignZoe Gillenwater
 
More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016Matt Gibson
 
HTML Block and Inline Elements
HTML Block and Inline ElementsHTML Block and Inline Elements
HTML Block and Inline ElementsWebtech Learning
 
The future of media queries?
The future of media queries?The future of media queries?
The future of media queries?yiibu
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of LayoutStephen Hay
 
Maintainable CSS
Maintainable CSSMaintainable CSS
Maintainable CSSStephen Hay
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The FlowStephen Hay
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your websiteNicole Ryan
 

Destacado (20)

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
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewport
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)
 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queries
 
From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to Clarity
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs static
 
Beyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web DesignBeyond Media Queries: Anatomy of an Adaptive Web Design
Beyond Media Queries: Anatomy of an Adaptive Web Design
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016More than Media Queries: Reframing Responsive UX - SXSW 2016
More than Media Queries: Reframing Responsive UX - SXSW 2016
 
HTML Block and Inline Elements
HTML Block and Inline ElementsHTML Block and Inline Elements
HTML Block and Inline Elements
 
The future of media queries?
The future of media queries?The future of media queries?
The future of media queries?
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Maintainable CSS
Maintainable CSSMaintainable CSS
Maintainable CSS
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The Flow
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your website
 

Similar a Media queries

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJason Harwig
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinRazorfish
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTerminalfour
 
Every Web Developer is a Win8 developer
Every Web Developer is a Win8 developerEvery Web Developer is a Win8 developer
Every Web Developer is a Win8 developerKevin DeRudder
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudDavid Pallmann
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web appsJames Pearce
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebGeorge Kanellopoulos
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresherIvano Malavolta
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesPatric Lanhed
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshopJames Pearce
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
The web as it should be
The web as it should beThe web as it should be
The web as it should bethebeebs
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignDebra Shapiro
 

Similar a Media queries (20)

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic Welterlin
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
 
Every Web Developer is a Win8 developer
Every Web Developer is a Win8 developerEvery Web Developer is a Win8 developer
Every Web Developer is a Win8 developer
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the Cloud
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresher
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holes
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshop
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 

Más de Kevin DeRudder

Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Kevin DeRudder
 
Comparing xaml and html
Comparing xaml and htmlComparing xaml and html
Comparing xaml and htmlKevin DeRudder
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developersKevin DeRudder
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceKevin DeRudder
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6Kevin DeRudder
 
Building cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesBuilding cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesKevin DeRudder
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want itKevin DeRudder
 
Developers and Designers
Developers and DesignersDevelopers and Designers
Developers and DesignersKevin DeRudder
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5Kevin DeRudder
 

Más de Kevin DeRudder (12)

Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$Build your own Cloud/Home security system for 60$
Build your own Cloud/Home security system for 60$
 
Comparing xaml and html
Comparing xaml and htmlComparing xaml and html
Comparing xaml and html
 
ECMASCRIPT.NEXT
ECMASCRIPT.NEXTECMASCRIPT.NEXT
ECMASCRIPT.NEXT
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developers
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation Service
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6
 
Building cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile ServicesBuilding cross platform applications using Windows Azure Mobile Services
Building cross platform applications using Windows Azure Mobile Services
 
Responsive SharePoint
Responsive SharePointResponsive SharePoint
Responsive SharePoint
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want it
 
Developers and Designers
Developers and DesignersDevelopers and Designers
Developers and Designers
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 

Último

call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...Delhi Call girls
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentationamedia6
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...Delhi Call girls
 
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...sonalitrivedi431
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...RitikaRoy32
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...Call Girls in Nagpur High Profile
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxjanettecruzeiro1
 
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxTusharBahuguna2
 
Tapestry Clothing Brands: Collapsing the Funnel
Tapestry Clothing Brands: Collapsing the FunnelTapestry Clothing Brands: Collapsing the Funnel
Tapestry Clothing Brands: Collapsing the Funneljen_giacalone
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...ranjana rawat
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️soniya singh
 
Pastel Portfolio _ by Slidesgo.pptx. Xxx
Pastel Portfolio _ by Slidesgo.pptx. XxxPastel Portfolio _ by Slidesgo.pptx. Xxx
Pastel Portfolio _ by Slidesgo.pptx. XxxSegundoManuelFaichin1
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵anilsa9823
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
 

Último (20)

call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentation
 
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Kaushambi (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
 
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Basapura ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
 
Tapestry Clothing Brands: Collapsing the Funnel
Tapestry Clothing Brands: Collapsing the FunnelTapestry Clothing Brands: Collapsing the Funnel
Tapestry Clothing Brands: Collapsing the Funnel
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
Pastel Portfolio _ by Slidesgo.pptx. Xxx
Pastel Portfolio _ by Slidesgo.pptx. XxxPastel Portfolio _ by Slidesgo.pptx. Xxx
Pastel Portfolio _ by Slidesgo.pptx. Xxx
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 

Media queries

  • 1. USING MEDIA QUERIES to build Mobile Web Applications
  • 2. @kevinderudder working for eGuidelines and a lecturer at the Technical University of West Flanders. Contact me on kevin@e-guidelines.be
  • 3.
  • 4. Website on a desktop Website on a mobile phone
  • 5.
  • 6.
  • 7. Agenda • Why this topic • Native vs Web apps • Responsive Design • HTML5 and CSS3 to the rescue • Usefull HTML5 Tags • Media Queries
  • 10.
  • 11.
  • 12. As a web developer you should target multiple (all) devices
  • 14. Native Development • Windows Metro Applications • XAML with C#, VB.NET or C++ • HTML with JavaScript • iOS apps • Objective C • Android • Java
  • 15. HTML5 and CSS3 to the rescue
  • 16. = CONTENT = UI
  • 17.
  • 18. HTML5 Structure Indexed DB File APIs Forms Audio and History Web Workers XHR2 Video Navigation ... Drag and Canvas WebSockets Messaging Drop Server-Sent Web Storage Offline Geolocation Events
  • 19. HTML5 Structure Indexed DB File APIs Forms Audio and History Web Workers XHR2 Video Navigation ... Drag and Canvas WebSockets Messaging Drop Server-Sent Web Storage Offline Geolocation Events
  • 20. CSS3 Rounded Colors Box Shadow Text Effects Corners HSL, HSLA Multi-column Box Model Web Fonts Borders layout Media Attribute Background Selectors Queries matching
  • 21. CSS3 Rounded Colors Box Shadow Text Effects Corners HSL, HSLA Multi-column Box Model Web Fonts Borders layout Media Attribute Background Selectors Queries matching
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Let’s get started and change that MVC site into a cross platform/device web application
  • 27. Before you even think about designing CONTENT IS KING
  • 28.
  • 29.
  • 30. How do you point to the specific content??
  • 31. <div id=“header”> <div id=“top” />... <div id=“navigation”> <div id=“menu”>... <div id=“main”> <div class=“content”> <div id=“left”> <div class=“content”> <div id=“footer”>
  • 32. <header> <nav> <section> <article> <aside> <article> <footer>
  • 33.
  • 34. <header /> <nav /> <article /> <section /> <aside /> <footer />
  • 35. <header /> <nav /> <section /> <aside /> <article />
  • 36. DEMO
  • 37. <header /> <nav /> <article /> <section /> <aside /> <footer />
  • 39. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 40. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 41. <script type="text/javascript"> if (screen.width <= 320) { document.location = "m.microsoft.com"; } </script>
  • 42.
  • 43.
  • 44.
  • 45. This is good, if you want to deliver different content
  • 46.
  • 47.
  • 48. But, do you create a custom experience for each (new) browser or device
  • 49. How are you gonna serve the page to the device 1. Redirect 2. Responsive design via Media Queries
  • 50. What does it mean: RESPONSIVE
  • 51. Pictures of M. vatia
  • 52. Pictures of M. vatia
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. If you want to make your web app responsive, you should implement 3 ingredients • A flexible, grid-based layout • Flexible images and media • Media Queries
  • 58.
  • 59. We will only focus on Media Queries
  • 60.
  • 61.
  • 62.
  • 63. Media Queries allow you write design code based on the characteristics of a device
  • 64. Media Queries exists out of 2 parts MEDIA QUERY Type Query or Expression @media all and (max-width: 640px) { }
  • 65. Media Queries exists out of 2 parts 1. Media Type 2. Expression
  • 67.
  • 69. The media types Taken from the W3C site All Suitable for all devices Braille Intended for braille tactile feedback devices Embossed Intended for paged braille printers Handheld Intended for handheld devices Print Intended for paged material Projection Intended for projected presentations Screen Intended primarily for color computer screens Speech Inteded for speech synthesizers Tty Media using a fixed character grid Tv Intended for television-type devices
  • 70. AHA, there is something like handheld
  • 71. @media screen { body { background-color: Red; } } @media handheld { body { background-color: Yellow; } } This is not yellow
  • 72. Old devices didn’t have capable browsers
  • 73. Modern mobile devices use screen as media type
  • 74. Media Queries exists out of 2 parts 1. Media Type 2. Expression
  • 75. MEDIA QUERY Type Query or Expression @media all and (max-width: 640px) { Feature Value }
  • 76. The Features Features with min- and max- prefixes • Width • Aspect-ratio • Height • Device-aspect-ratio • Device-width • Color • Device-height • Color-index • Resolution • Monochrome
  • 77. The Features Features without min- and max- prefixes • Orientation • Scan • Grid
  • 78. 3 Ways to implement Media Queries 1. 2. 3.
  • 82. NOT
  • 83. DEMO
  • 85.
  • 86.
  • 87.