Skip to content

Instantly share code, notes, and snippets.

@rossnelson
Last active November 23, 2019 04:22
Show Gist options
  • Save rossnelson/2b47888d12616a9271aa19dde6628f7b to your computer and use it in GitHub Desktop.
Save rossnelson/2b47888d12616a9271aa19dde6628f7b to your computer and use it in GitHub Desktop.
.nav {
overflow: hidden;
}
.nav .menu-item {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
text-decoration: none;
}
.nav .icon {
display: none;
}
@media screen and (max-width: 600px) {
.nav .menu-item:not(:first-child) {display: none;}
.nav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.nav.responsive {position: relative;}
.nav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.nav.responsive .menu-item {
float: none;
display: block;
text-align: left;
}
}
<a href="javascript:void(0);" class="icon" onclick="navToggle()">
<i class="fa fa-bars"></i>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment