Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created April 15, 2020 14:54
Show Gist options
  • Save azamsharp/377552399e766530969355b61b906b44 to your computer and use it in GitHub Desktop.
Save azamsharp/377552399e766530969355b61b906b44 to your computer and use it in GitHub Desktop.
<html>
<head>
<!-- Meta always inside the head and it is required for responsive websites -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="mq.css"></link>
</head>
<body>
HELLO WORLD
</body>
</html>
/* Mobile Devices */
@media only screen and (min-width: 320px) and (max-width: 480px) {
body {
background-color: green;
}
}
/* Larger iPhones, iPads, Desktops */
@media only screen and (min-width: 481px) and (max-width:800px) {
body {
background-color: red;
}
}
/* Common Styles */
body {
font-family: Arial, Helvetica, sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment