Posted By

shadow_d2 on 11/03/10


Tagged

css width html without center Sem best melhor centralizar centralized largura


Versions (?)

Centralizar menu sem largura ( width without center menu )


 / Published in: CSS
 

Centralizar menu sem usar width

  1. HTML:
  2.  
  3. <nav>
  4. <ul>
  5. <li><a href="#">Home</a></li>
  6. <li><a href="#">Article & Tutorials</a></li>
  7. <li><a href="#">Contact</a></li>
  8. </ul>
  9. </nav>
  10.  
  11.  
  12. CSS:
  13.  
  14. nav {
  15. overflow: hidden;
  16. }
  17. nav ul{
  18. list-style: none;
  19. float: left;
  20. position: relative;
  21. left: 50%;
  22. }
  23. nav ul li{
  24. float: left;
  25. position: relative;
  26. right: 50%;
  27. margin: 0 1px;
  28. }

Report this snippet  

You need to login to post a comment.