The @media rule is used to define different style rules for different media types/devices.
If it doesnt work, check your code. you might have made a typo someweresomewhere.
Example:
@media only screen and (max-device-width : 640px) {
/* Styles */
}
@media only screen and (max-device-width: 768px) {
/* Styles */
}
@media only screen and (max-device-width: 640px) {
/* Styles */
}
@media only screen and (max-device-width: 768px) {
/* Styles */
}
EarlyerEarlier post: How to code CSS media queries targeting ALL mobile devices and tablets?
W3schools: http://www.w3schools.com/cssref/css3_pr_mediaquery.asp