Skip to content

Instantly share code, notes, and snippets.

@panoply
Created May 9, 2016 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save panoply/180e4a0e8650ded03f681942b8883feb to your computer and use it in GitHub Desktop.
Save panoply/180e4a0e8650ded03f681942b8883feb to your computer and use it in GitHub Desktop.
Horizontal menu with dash separators.
<ul class="dash">
<li class="active">
<a href="#"> One
</a>
</li>
<li>
<a href="#">
Two
</a>
</li>
<li>
<a href="#">
Three
</a>
</li>
<li>
<a href="#">
Four
</a>
</li>
<li>
<a href="#">
Five
</a>
</li>
<li>
<a href="#">
Six
</a>
</li>
</ul>
.dash {
width: 100%;
list-style-type: none;
text-align: center;
li {
display: inline-block;
padding: 0 7px 0 0;
@media screen and (max-width: 768px) {
padding: 0 10px 0 0;
}
a {
text-transform: uppercase;
text-decoration: none;
&.active {
font-weight: 600;
}
&:hover {
text-decoration: underline;
}
}
&.active {
a {
font-weight: 700;
}
}
&:after {
content: " | ";
padding-left: 7px;
text-decoration: none !important;
@media (max-width: 768px) {
content: " ";
padding-left: 0;
}
}
&:last-child {
&:after {
content: none !important;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment