Skip to content

Instantly share code, notes, and snippets.

@skube
Last active December 27, 2015 17:19
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 skube/7361003 to your computer and use it in GitHub Desktop.
Save skube/7361003 to your computer and use it in GitHub Desktop.
Simple inline navigation with CSS
<style>
.nav {
list-style: none;
}
.nav > li,
.nav > li a {
display: inline-block;
*display: inline;
zoom: 1;
}
/*
remember tho: inline-block creates 4px margins
http://css-tricks.com/fighting-the-space-between-inline-block-elements/
*/
</style>
<ul class="nav">
<li class="item01"><a href="#">something</a></li>
<li class="item02"><a href="#">something</a></li>
<li class="item03"><a href="#">something</a></li>
<li class="item04"><a href="#">something</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment