Skip to content

Instantly share code, notes, and snippets.

@dennisschipper
Created October 24, 2011 17:26
Show Gist options
  • Save dennisschipper/1309582 to your computer and use it in GitHub Desktop.
Save dennisschipper/1309582 to your computer and use it in GitHub Desktop.
Telling media queries apart
BODY:before { /** create a box nefore the <body> to hold our stuff **/
display:block;
border: 1px solid #c5c5c5;
cursor: default;
background: #404040;
color: #fff;
font-size: 0.7em;
padding: 5px;
margin: 5px;
float: right;
top: 10px;
right: 10px;
}
@media screen and (min-width: 1024px) { /** Everything from 1024px and over **/
BODY:before {
content: "1024 & over";
}
}
@media screen and (max-width: 1023px) { /** Tablets, everything from 1023px down to 641px**/
BODY:before {
content: "Tablets";
}
}
@media screen and (max-width: 640px) { /** Anything from 0 to 640px, mobile phones etc **/
BODY:before {
content: "Mobiles";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment