Skip to content

Instantly share code, notes, and snippets.

@rafalohaki
Created July 13, 2020 00:38
Show Gist options
  • Save rafalohaki/f406ff9f881ee131d5c6897f89d64840 to your computer and use it in GitHub Desktop.
Save rafalohaki/f406ff9f881ee131d5c6897f89d64840 to your computer and use it in GitHub Desktop.
Simple Navigation With Inline-Block & Flexbox
<nav>
<div>
<a href="#">Home</a>
<a href="#">Products</a>
<a href="#">About</a>
</div>
<a href="#">Help</a>
</nav>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
nav {
background: #222 url(//demosthenes.info/assets/images/debut_dark.png);
font-family: proxima-nova,sans-serif;
font-size: 0;
display: flex;
justify-content: space-between;
max-width: 800px;
margin: 2rem auto;
}
nav a {
font-size: 1.4rem;
color: #fff;
text-decoration: none;
transition: .4s;
display: inline-block;
padding: 1rem;
}
nav a:hover {
background: rgba(255,0,0,0.5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment