11 Replies Latest reply on Feb 4, 2010 9:07 PM by nemci7v

    Centering navigation menu

    nemci7v Level 1

      Hello all!

       

      I can't figure out how to center a horizontal menu.

       

      This is the css:

       

      .navigation {
           border:1px solid #cdcdcd;
              padding:15px;
      }
      
      .navigation li {
           border-left:1px solid #cdcdcd;
              display:inline;
              float:left;
              font-weight:bold;
              line-height:10px;
              margin-left:15px;
              padding-left:15px;
      }
      
      .navigation li:first-child {
              padding-left:0;
              border-left:none;
              margin-left:0;
      }
      

       

      and the HTML:

       

      <div class="navigation">
      <ul>
      <li>item1</li>
      <li>itemt2</li>
      <li>item 3</li>
      </ul>
      </div>
      

       

      I tried text-align:center in the .navigation but nothing happens.. is there a solution?