Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save edwardlorilla/349326fad1eed0234c62e51287523040 to your computer and use it in GitHub Desktop.
Save edwardlorilla/349326fad1eed0234c62e51287523040 to your computer and use it in GitHub Desktop.
Learning simple navigation with flex
<div id="app">
<nav id="single-nav" class="single-nav menu" role="navigation">
<ul>
<li><a>Start</a></li>
<li><a>Essen</a></li>
<li><a>Seminare</a></li>
<li><a>Rezepte</a></li>
<li><a>News</a></li>
<li><a>Uber</a></li>
<li><a>Kontakt</a></li>
</ul>
</nav></div>
.menu-section{
padding-bottom: 2em;
margin-bottom:2em;
}
.menu ul{
list-style-type: none;
padding: 0;
margin:0;
background: hsl(0,0%, 15%)
}
.menu li a{
display:block;
text-decoration:none;
color:white;
padding: .6em 1em;
}
.menu li a:hover,
.menu li a:focus{
background:hsl(0,0%, 25%)
}
@media screen and (min-width: 30em){
.single-nav ul{
display:flex;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment