Skip to content

Instantly share code, notes, and snippets.

@ideefixe
Created January 22, 2013 21:27
Show Gist options
  • Save ideefixe/4598590 to your computer and use it in GitHub Desktop.
Save ideefixe/4598590 to your computer and use it in GitHub Desktop.
iPad Media Queries
/* iPads 1 & 2 (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* css goes here */
}
/* iPads 1 & 2 (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* css goes here */
}
/* iPads 1 & 2 (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* css goes here */
}
/* iPad 3 & 4 */
@media only screen
and (min-device-width: 1536px)
and (max-device-width: 2048px)
and (-webkit-min-device-pixel-ratio: 2)
{
/* css goes here */
}
/* iPads 3 & 4 (landscape) ----------- */
@media only screen
and (min-device-width: 1536px)
and (max-device-width: 2048px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation : landscape) {
/* css goes here */
}
/* iPads 3 & 4 (portrait) ----------- */
@media only screen
and (min-device-width: 1536px)
and (max-device-width: 2048px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation : portrait) {
/* css goes here */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment