@MediaQueries [Oct. 11, 2011, 8:04 p.m.]
READ FIRST!
http://www.quirksmode.org/mobile/viewports.html
W3C Candidate Recommendation 27 July 2010
@Media Queries (http://www.w3.org/TR/css3-mediaqueries) are going to be the ultimate tool in the web designers toolbox for many years to come. That is why we should brush up on the devices we will be targeting in this age of mobile freedom.
Basically, this means you can change stylesheets based on for instance the width and height of the viewport. In a broader sense, this means as the spec puts it: “by using Media Queries, presentations can be tailored to a specific range of output devices without changing the content itself.” -CSS3.info
The complete list of media types in HTML4 is:
-
aural
-
braille
-
handheld
-
print
-
projection
-
screen
-
tty
-
tv
CSS2 defines the same list, deprecates ‘aural
’ and adds ‘embossed
’ and ‘speech
’. Also, ‘all
’ is used to indicate that the style sheet applies to all media types.
Even though we use the term "mobile", let's not confuse this term with the idea of "small screens." Mobile means something entirely different and more complex, but first let us look at the devices we will be targeting in our queries.
iPod v1G-v3G
( G=generation )
iPod 1G,2G,3G
- Rendering Surface : 480px X 320px @163ppi
- Wi-Fi : 802.11b/g
@media query :
1. @media screen and (max-width: 320px), screen and (max-width:320px) and (orientation:portrait) {}
2. @media screen and (max-width: 480px), screen and (max-width:480px) and (orientation:landscape) {}
iPod 4G
- Rendering Surface : 960px X 640px @ 326ppi
- Wi-Fi : 802.11 b/g/n (n only 2.4 GHz)
@media query :
1. @media screen and (max-width: 640px), screen and (max-width:640px) and (orientation : portrait) {..}
2. @media screen and (max-width: 960px), screen and (max-width:960px) and (orientation : landscape) {..}
Support for 1024 x 768 with Dock Connector to VGA Adapter
iPad2
- Rendering Surface : 1024px X 768px @132ppi
- Wi-Fi : 802.11a/b/g/n
@media query :
1. @media screen and (max-width:1024px), screen and (max-width:1024px) and (orientation:landscape) {..}
1. @media screen and (max-device-width:768px), screen and (max-device-width:768px) and (orientation:portrait) {..}
Motorola DROID Bionic w/ Android OS
* Rendering Surface : 960 x 540
* MOTOPRINT : wireless printing over WiFi
* Webkit5 HTML Browser & Flash 10
* WiFi : b/g/n Capable
* HDMI connection w/ mirror mode 1080p
@media query :
1. @media screen and (max-width: 960px), screen and (max-width:960px) and (orientation:landscape) {}
2. @media screen and (max-width: 540px), screen and (max-width:540px) and (orientation: portrait) {}