Horizontal navigation centered in their container


/ Published in: HTML
Save to your folder(s)

A *ul* or *ol* list centered in the container.


Copy this code and paste it in your HTML
  1. <!-- The HTML -->
  2. <div class="w">
  3. <ul>
  4. <li>Elemento 1</li>
  5. <li>Elemento 2</li>
  6. <li>Elemento 2</li>
  7. </ul>
  8. </div>
  9.  
  10. <!-- The CSS -->
  11. <style type="text/css">
  12. .w { overflow:hidden; }
  13. ul { float:left; left:50%; position:relative; }
  14. li { float:left; right:50%; position:relative; }

URL: http://jsfiddle.net/Alwaison/n3YaC/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.