Skip to content

Instantly share code, notes, and snippets.

@justinwhall
Created September 1, 2012 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinwhall/3561807 to your computer and use it in GitHub Desktop.
Save justinwhall/3561807 to your computer and use it in GitHub Desktop.
CSS | Media Query Template
/* Xlarge screens ----------- */
@media only screen and (max-width : 1260px) {
.container{
width:1024px;
}
}
/* Desktops and laptops ----------- */
@media only screen and (max-width : 1024px) {
.container{
width: 850px
}
}
/* iPads (landscape) 1024px ----------- */
@media only screen and (max-width : 1260px) {
/*if needed*/
}
/* iPads (portrait) 768px ----------- */
@media only screen and (max-width : 850px) {
.container{
width: 768px
}
}
/* iPhone 4 ----------- */
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
}
/* iphone (landscape) 480px ----------- */
@media only screen and (max-width : 767px) {
.container{
width: 480px;
}
}
/* iphone (portrait) 320px ----------- */
@media only screen and (max-width : 480px) {
.container{
width: 320px
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment