Skip to content

Instantly share code, notes, and snippets.

@kijart
Created March 14, 2019 12:46
Show Gist options
  • Save kijart/b6edf83a376ed820f1e159536b85f92e to your computer and use it in GitHub Desktop.
Save kijart/b6edf83a376ed820f1e159536b85f92e to your computer and use it in GitHub Desktop.
CSS media queries for desktop, tablet and mobile
/*
* Device: Desktops
* Screen: 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
}
/*
* Device: Laptops, Desktops
* Screen: 1025px to 1280px
*/
@media (min-width: 1025px) and (max-width: 1280px) {
/* CSS */
}
/*
* Device: Tablets, Ipads (portrait)
* Screen: 768px to 1024px
*/
@media (min-width: 768px) and (max-width: 1024px) {
/* CSS */
}
/*
* Device: Tablets, Ipads (landscape)
* Screen: 768px to 1024px
*/
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
/* CSS */
}
/*
* Device: Low Resolution Tablets, Mobiles (Landscape)
* Screen: 481px to 767px
*/
@media (min-width: 481px) and (max-width: 767px) {
/* CSS */
}
/*
* Device: Most of the Smartphones Mobiles (Portrait)
* Screen: 320px to 479px
*/
@media (min-width: 320px) and (max-width: 480px) {
/* CSS */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment