title: Center Aligning A Horizontal Navigation Bar
body: <p>I am having a slight problem aligning my Horizontal Navigation bar to the center of the browser. Now before I put forward this query, I want to indicate that I'm new to HTML and CSS so bear with me on what is undoubtedly a quick fix!</p>
  
  <p>The header and footer are to be full width with a fixed content section in the center of the browser. The navigational bar is to sit underneath the header. At present, the bar is aligning itself to the left but it won't seem to budge without losing its shape.</p>
  
  <p>The HTML:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div id="header"&gt;
    &lt;div class="wrap"&gt;
      &lt;img src="images/logo_header.png" alt="Image alt." /&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="nav"&gt;
    &lt;div class="wrap"&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 1&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 2&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 3&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 4&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 5&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Option 6&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="content"&gt;&lt;div class="wrap"&gt;Content&lt;/div&gt;&lt;/div&gt;
  &lt;div id="footer"&gt;&lt;div class="wrap"&gt;Footer&lt;/div&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>and the CSS:</p>
  
  <pre><code>body {
    margin:0;
    padding:0;
    font-family:verdana;
  }
  .wrap {
    position:relative;
    margin:0 auto;
    width:960px;
  }
  #header {
    float:left;
    width:100%;
    background-color:#FFCC33;
  }
  #nav {
    float:left;
    background-color:#FFCC33;
    border-top:2px solid #000000;
  }
  #nav ul {
    list-style:none;
    display:inline;
    margin:0px;
    padding:0px;
  }
  #nav li {
    display:inline;
    line-height:1.8em;
  }
  </code></pre>