Thursday, April 7, 2011

CSS media queries

Media queries from a few sites, just for comparison...

colly.com

@media (min-device-width:1024px) and (max-width:989px),
screen and (max-device-width:480px),
(max-device-width:480px) and (orientation:landscape),
(min-device-width:481px) and (max-device-width:1024px) and (orientation:portrait)


@media (min-device-width:1024px) and (max-width:509px),
(max-device-width:480px) and (orientation:portrait)



hicksdesign.co.uk

@media screen and (max-width: 500px)
@media screen and (max-width: 800px)
@media screen and (min-width: 1024px)
----
/*layouts smaller than 600px, iPhone and mobiles*/
@media handheld and (max-width: 480px), screen and (max-device-width: 480px), screen and (max-width: 600px)


/*layouts larger than 900px*/
@media screen and (min-width: 920px)
@media screen and (min-width: 1350px)
@media screen and (min-width: 1500px)


/*Just iPhone*/
@media only screen and (max-device-width: 480px)


/*iPad styles*/
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px)


alistapart.com/d/responsive-web-design/ex/ex-site-FINAL.html

@media (max-width: 600px)
@media (max-width: 400px)
@media (min-width: 1300px)


simplebits.com

@media screen and (max-width: 800px)
@media screen and (max-width: 650px)


mediaqueri.es

@media screen and (max-width:64em)
@media screen and (max-width:48em)
@media screen and (max-width:20em)
@media screen and (max-width:23em)


hardboiledwebdesign.com

@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)


@media only screen and (max-width : 480px)


Hardboiled CSS3 Media Queries
(http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries)

/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)


/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px)


/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px)


/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)


/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape)


/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)


/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px)


/* Large screens ----------- */
@media only screen
and (min-width : 1824px)


/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5)


yiibu.com

media="screen, handheld"
media="only screen and (min-width: 320px) and (max-width: 640px)"
media="only screen and (min-width: 640px)"


stunningcss3.com/code/bakery

@media screen and (min-width: 1200px)
@media screen and (max-width: 760px)
@media screen and (max-width: 550px)
@media screen and (max-width: 400px)
@media screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 480px)