SlideShare uma empresa Scribd logo
1 de 6
Media Query
Company :
Browzed Solutions India
Developed By:
Kadir H. Kapadiya
What is media query?
 We can have different blocks of CSS code for different screen and device
sizes.
 In today's world, users view web pages on a wide range of screens. Screens
can range from the large displays on their work stations, to their laptops on
the air plane, to their iPad or other tablets while sitting in the park and
finally on their small mobile phone screens on the go.
 If you've styled print documents with CSS, then you are already familiar with
defining different styles for different devices. With media queries, we'll take
this to a new level. Rather than looking at what device it is, we will look at
what capabilities the device has.
 CSS Media queries allow you to apply changes to your sites design based on
the viewing size and capability of the device on which your content is
displayed.
 More specifically, we will look at the following:
 height and width of the device
 height and width of the browser
 screen resolution
 orientation of the device (for mobile phones and tablets; portrait or landscape)
 Media Queries is a CSS3 module allowing content rendering to adapt to
conditions such as screen resolution (e.g. smartphone vs. high definition
screen). It became a W3C recommended standard in June 2012. and is a
cornerstone technology of Responsive Web Design.
 Responsive web design (RWD) is a web design approach aimed at crafting
sites to provide an optimal viewing experience—easy reading and navigation
with a minimum of resizing, panning, and scrolling—across a wide range of
devices (from mobile phones to desktop computer monitors)
 Media Types:
1. All = Used for all media type devices
2. Screen = Used for computer screens
3. Print = Intended for paged material and for documents viewed on
screen in print preview mode
4. Aural = Used for speech and sound synthesizers
5. Projection = Used for projected presentations, like slides
6. Tty = Used for media using a fixed-pitch character grid, like
teletypes and terminals like teletypes and terminals
7. Tv = Used for television-type devices
 For Example :-
< link href="mobile.css" type="text/css" media="screen and (max-width:
480px)" rel="stylesheet"/>
< link href="mobile.css" type="text/css" media=“print and (font-size:
20px)" rel="stylesheet"/>
In CSS :-
@media screen and (max-width : 480px){
#id{
float : none;
width : 60%;
background-color : #ffb3b3;
}
}
THANK YOU

Mais conteúdo relacionado

Semelhante a Media Query

Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
Shawn Calvert
 
Responsive Web Designs
Responsive Web DesignsResponsive Web Designs
Responsive Web Designs
Nusrat Khanom
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic Welterlin
Razorfish
 

Semelhante a Media Query (20)

Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive web
Responsive webResponsive web
Responsive web
 
Responsive_Web_Design
Responsive_Web_DesignResponsive_Web_Design
Responsive_Web_Design
 
Responsive Web Designs
Responsive Web DesignsResponsive Web Designs
Responsive Web Designs
 
Introduction | SEO Expate BD Ltd.
Introduction | SEO Expate BD Ltd.Introduction | SEO Expate BD Ltd.
Introduction | SEO Expate BD Ltd.
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Introduction | SEO Expate BD Ltd.
Introduction | SEO Expate BD Ltd.Introduction | SEO Expate BD Ltd.
Introduction | SEO Expate BD Ltd.
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Developing for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic WelterlinDeveloping for Responsive Design - Frederic Welterlin
Developing for Responsive Design - Frederic Welterlin
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Reponsive web design (HTML5 + css3)
Reponsive web design (HTML5 + css3)Reponsive web design (HTML5 + css3)
Reponsive web design (HTML5 + css3)
 
Responsive Web Designs.pdf
Responsive Web Designs.pdfResponsive Web Designs.pdf
Responsive Web Designs.pdf
 

Mais de ipower softwares (12)

Website Security
Website SecurityWebsite Security
Website Security
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Angular JS
Angular JSAngular JS
Angular JS
 
Big Data
Big DataBig Data
Big Data
 
Big Data
Big DataBig Data
Big Data
 
Big Data
Big DataBig Data
Big Data
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
 
WPF
WPFWPF
WPF
 
Windows phone 8 (mvvm)
Windows phone 8 (mvvm)Windows phone 8 (mvvm)
Windows phone 8 (mvvm)
 
Mvc 4
Mvc 4Mvc 4
Mvc 4
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Último (20)

WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

Media Query

  • 1. Media Query Company : Browzed Solutions India Developed By: Kadir H. Kapadiya
  • 2. What is media query?  We can have different blocks of CSS code for different screen and device sizes.  In today's world, users view web pages on a wide range of screens. Screens can range from the large displays on their work stations, to their laptops on the air plane, to their iPad or other tablets while sitting in the park and finally on their small mobile phone screens on the go.  If you've styled print documents with CSS, then you are already familiar with defining different styles for different devices. With media queries, we'll take this to a new level. Rather than looking at what device it is, we will look at what capabilities the device has.  CSS Media queries allow you to apply changes to your sites design based on the viewing size and capability of the device on which your content is displayed.
  • 3.  More specifically, we will look at the following:  height and width of the device  height and width of the browser  screen resolution  orientation of the device (for mobile phones and tablets; portrait or landscape)  Media Queries is a CSS3 module allowing content rendering to adapt to conditions such as screen resolution (e.g. smartphone vs. high definition screen). It became a W3C recommended standard in June 2012. and is a cornerstone technology of Responsive Web Design.  Responsive web design (RWD) is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors)
  • 4.  Media Types: 1. All = Used for all media type devices 2. Screen = Used for computer screens 3. Print = Intended for paged material and for documents viewed on screen in print preview mode 4. Aural = Used for speech and sound synthesizers 5. Projection = Used for projected presentations, like slides 6. Tty = Used for media using a fixed-pitch character grid, like teletypes and terminals like teletypes and terminals 7. Tv = Used for television-type devices
  • 5.  For Example :- < link href="mobile.css" type="text/css" media="screen and (max-width: 480px)" rel="stylesheet"/> < link href="mobile.css" type="text/css" media=“print and (font-size: 20px)" rel="stylesheet"/> In CSS :- @media screen and (max-width : 480px){ #id{ float : none; width : 60%; background-color : #ffb3b3; } }