CodePen

HTML

            
              <nav>
  <ul>
      <li>item1</li>
      <li>item1</li>
      <li>item1</li>
      <li>item1</li>
  </ul>
</nav>
            
          
!

CSS

            
              nav {
  width: 50%;
  margin: 0 auto;
  background: #999;
  overflow: hidden;
}

ul {
  display: table;
  margin: 0 auto;
}

ul li {
  float: left;
  padding: 5px 10px;
  margin: 5px;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................