Skip to content

Instantly share code, notes, and snippets.

@Ross-Hunter
Created October 18, 2017 17:23
Show Gist options
  • Save Ross-Hunter/fa5e64d82f795e28ab2595f682c8db8b to your computer and use it in GitHub Desktop.
Save Ross-Hunter/fa5e64d82f795e28ab2595f682c8db8b to your computer and use it in GitHub Desktop.
Flexbox Mobile Funtimes!
<html>
<style>
/* RESET CSS */
ul {
margin: 0;
padding: 0;
}
li {
margin: 0;
padding: 0;
list-style: none;
}
/* END RESET CSS*/
.flex-container {
display: flex;
align-items: baseline;
flex-direction: column;
justify-content: space-between;
}
.top-nav {
background-color: #551A8B;
color: rgba(255,255,255,0.8);
font-family: sans-serif;
border: 2px solid black;
padding: 20px;
}
.nav-menu {
justify-content: flex-end;
}
.nav-item {
padding: 10px;
}
@media (min-width: 768px) {
.flex-container {
flex-direction: row;
}
/* .top-nav.reverse {
flex-direction: row-reverse;
}*/
.nav-item {
padding: 5px;
}
}
</style>
<body>
<nav class="flex-container top-nav reverse">
<span class="nav-item">Grant's Dog Walking!</span>
<ul class="flex-container nav-menu">
<li class="nav-item">Home</li>
<li class="nav-item">Prices</li>
<li class="nav-item">Contact Us</li>
</ul>
</nav>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment