Skip to content

Instantly share code, notes, and snippets.

@reactivepixel
Created July 13, 2012 18:11
Show Gist options
  • Save reactivepixel/3106399 to your computer and use it in GitHub Desktop.
Save reactivepixel/3106399 to your computer and use it in GitHub Desktop.
Common Media Queries
/* Media Query: Smartphones (landscape) */
@media only screen
and (min-width : 321px) {
/* Your styles go here... */
}
/* Media Query: Smartphones (portrait) */
@media only screen
and (max-width : 320px) {
/* Your styles go here... */
}
/* Media Query: Smartphones (portrait and landscape) */
@media only screen
and (min-width : 320px)
and (max-width : 480px) {
/* Your styles go here... */
}
/* Media Query: iPads (landscape) */
@media only screen
and (min-width : 768px)
and (max-width : 1024px)
and (orientation : landscape) {
/* Your styles go here... */
}
/* Media Query: iPads (portrait) */
@media only screen
and (min-width : 768px)
and (max-width : 1024px)
and (orientation : portrait) {
/* Your styles go here... */
}
/* Media Query: iPads (portrait and landscape) */
@media only screen
and (min-width : 768px)
and (max-width : 1024px) {
/* Your styles go here... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment