Skip to content

Instantly share code, notes, and snippets.

@emekdahl
Last active August 29, 2015 14:15

Revisions

  1. @marcobarbosa marcobarbosa revised this gist Jan 27, 2011. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions CSS3 Media Queries Template
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    /*
    * Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
    */

    /* Smartphones (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 320px)
  2. @invalid-email-address Anonymous created this gist Jan 27, 2011.
    60 changes: 60 additions & 0 deletions CSS3 Media Queries Template
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    /* Smartphones (portrait and landscape) ----------- */
    @media only screen
    and (min-device-width : 320px)
    and (max-device-width : 480px) {
    /* Styles */
    }

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

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

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

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

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

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

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

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