1/* Max-width */
2@media only screen and (max-width: 600px) {...}
3
4/* Min-width */
5@media only screen and (min-width: 600px) {...}
6
7/* Combining media query expressions */
8@media only screen and (max-width: 600px) and (min-width: 400px) {...}
1<style type="text/css">
2 /* default styles here for older browsers.
3 I tend to go for a 600px - 960px width max but using percentages
4 */
5 @media only screen and (min-width: 960px) {
6 /* styles for browsers larger than 960px; */
7 }
8 @media only screen and (min-width: 1440px) {
9 /* styles for browsers larger than 1440px; */
10 }
11 @media only screen and (min-width: 2000px) {
12 /* for sumo sized (mac) screens */
13 }
14 @media only screen and (max-device-width: 480px) {
15 /* styles for mobile browsers smaller than 480px; (iPhone) */
16 }
17 @media only screen and (device-width: 768px) {
18 /* default iPad screens */
19 }
20 /* different techniques for iPad screening */
21 @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
22 /* For portrait layouts only */
23 }
24
25 @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
26 /* For landscape layouts only */
27 }
28</style>
1@media screen and (min-width: 200px) and (max-width: 640px) {
2 .bloc {
3 display:block;
4 clear:both;
5 }
6}
1/* What this query really means, is If [device width] is less than or equal to 600px, then do */
2@media only screen and (max-width: 600px) {...}
3
4/* What this query really means, is If [device width] is greater than or equal to 600px, then do */
5@media only screen and (min-width: 600px) {...}