Posted By

Alwaison on 06/30/11


Tagged

css html


Versions (?)

Horizontal navigation centered in their container


 / Published in: HTML
 

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

A ul or ol list centered in the container.

  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; }

Report this snippet  

You need to login to post a comment.