Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created September 23, 2018 13:04
Show Gist options
  • Save harrisonmalone/b5f4762e00568b1e044fe20abbe67d33 to your computer and use it in GitHub Desktop.
Save harrisonmalone/b5f4762e00568b1e044fe20abbe67d33 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
margin: 0;
padding: 0;
}
p {
margin: 0px;
}
@media only screen and (max-width: 2000px) {
body {
background-color: green;
}
nav {
height: 50px;
background-color: white;
display: flex;
align-items: center;
}
nav a {
margin: 0 10px;
}
}
@media only screen and (max-width: 768px) {
body {
background-color: blue;
}
}
@media only screen and (max-width: 470px) {
body {
background-color: red;
}
nav {
position: fixed;
height: 100vh;
width: 200px;
display: flex;
flex-direction: column;
}
nav a {
margin: 10px 0px;
}
}
</style>
</head>
<body>
<nav>
<a href="www.google.com">Google</a>
<a href="www.harrisonmalone.com">Me</a>
<a href="www.codepen.io">CodePen</a>
</nav>
<p>hello</p>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment