Created
March 7, 2012 18:16
-
-
Save endigo9740/1994839 to your computer and use it in GitHub Desktop.
CSS: Media Queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Via Link Tag --> | |
<link rel="stylesheet" href="handheld.css" media="only screen and (max-device-width:480px)"/> | |
<!-- Via CSS Media Queries --> | |
<style type="text/css"> | |
/* Width */ | |
@media (max-width: 1024px) { body {width: 1024px;} } /* Landscape */ | |
@media (max-width: 768px) { body {width: 768px;} } /* Portrait */ | |
/* Width & Orientation */ | |
@media (max-device-width: 1024px) and (orientation: landscape) { body {width: 1024px; } | |
@media (max-device-width: 768px) and (orientation: portrait) { body {width: 768px; } | |
@media only screen and (max-device-width: 480px) { | |
/* CSS goes here… */ | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment