title: Can't center a ul inside a div
body: <p>I am trying to center my navigation links inside the <code>div</code> but no matter what I've tried it won't work. I've tried <code>margin-left:auto</code>, <code>margin-right:auto</code>, but nothing...</p>
  
  <p>Here is the section of CSS code:</p>
  
  <pre><code>#nav {
      display:block;
      background-color:#505050;
      height:17.5px;
      box-shadow: 0px 0px 15px 5px #CCCCCC inset;
      border:1px solid #EEEEEE;
      border-radius:20px;
      padding:1.5%;
  }
  #nav li {
      padding:0px 20px 0px 20px;
      display:inline;
      /*float:left;*/
      list-style:none;
      position:relative;
  }
  #nav li a {
      padding:0px 0px 20px 0px;
      color:#FFFFFF;
      text-decoration:none;
  }
  </code></pre>
  
  <p>and here is my ul code:</p>
  
  <pre><code>&lt;ul id="nav"&gt;
      &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Current Litters&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Gallery&lt;/a&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="./bandi.html"&gt;Bandi&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="./studs.html"&gt;Studs Used&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;Test Dog2&lt;/li&gt;
              &lt;li&gt;Test Dog3&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#form"&gt;Contact Us&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
  </code></pre>
  
  <p>Here is the rest of my code
  actually without it i noticed that my drop down menu under (gallery) doesn't display correctly, ...here is the rest of that css file...that shows what happens to the drop down...maybe you can tell me why the float screws it all up...         </p>
  
  <p>...and the text align did great....but only after removing the float...                                                     </p>
  
  <pre><code>#nav li a:hover {
      text-decoration:underline;
  }
  #nav li ul{
      padding:10px;
      font-size:medium;
      display:none;
      position:absolute;
      left:0px;
      top:30px;
      background-color:rgba(50,50,50,0.8);
  }
  #nav li:hover ul {
      display:block;
      border-radius:20px;
      border:1px solid;
      width:150px;
  }
  </code></pre>