Skip to content

Instantly share code, notes, and snippets.

@kosinix
Created March 15, 2017 17:40
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 kosinix/a8c546104a4a0076ecca353a4bf8046e to your computer and use it in GitHub Desktop.
Save kosinix/a8c546104a4a0076ecca353a4bf8046e to your computer and use it in GitHub Desktop.
CSS min-width vs max-width
@media screen and (min-width:100px) { /* Screen >= 100 */
body { font-weight:bold; }
}
@media screen and (min-width:200px) { /* Screen >= 200 */
body { color:#555; }
}
@media screen and (max-width:100px) { /* Screen <= 100 */
body { font-weight:bold; }
}
@media screen and (max-width:200px) { /* Screen <= 200 */
body { color:#555; }
}
/*
min-* means greater than or equals to x
max-* means less than or equals to x
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment