Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich are the most important media queries to use in creating mobile responsive design?
    primarykey
    data
    text
    <p>There are a lot different media queries for mobile screen sizes. It can be overwhelming to accomodate all of them when designing a responsive mobile site. Which are the most important ones to use when designing for mobile? I found this article that does a pretty good job of outlining the available media queries: <a href="http://css-tricks.com/snippets/css/media-queries-for-standard-devices/" rel="noreferrer">http://css-tricks.com/snippets/css/media-queries-for-standard-devices/</a>.</p> <pre><code>/* 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 */ } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThere's no correct answer to this really, it's pretty much up you you to decide. Personally I only set my personal website to have one media query of max-width:480px for mobile devices but that's just what I was happy with. You may want to have different layouts for many different sizes.
      singulars
    2. COThis can't really be answered, it's a very subjective question. You should create breakpoints in your design when it looks bad rather than trying to target device widths. Responsive design is about looking past devices and make the sites future friendly. As a 'best practice' your styles should be defined without a media query and build up using min-width to override styles as the screen gets larger. This is a mobile first approach and is the most widely backed approach to responsive design.
      singulars
    3. COI don't believe this is a truly subjective question, devices can be readily grouped into the standardised media query groups and devices with a higher screen density have a pixel ratio which fits them into those groups - for now. Considering the fact that the vast majority of responsive sites use frameworks such as bootstrap, foundation or skeleton which also use these media queries it seems safe to also do so for the time being. This can definitely be answered, within the scope of ever changing standards.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload