title: How to center links in header using CSS?
body: <p>I wanted to make the links centered on the screen rather than placed in a location to a certain number of pixels. </p>
  
  <p>Here's my code:</p>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>.HorizLinks  {
      position: absolute; 
      top: 77px; 
      left: 180px;
  }
  .HorizLinks ul { 
      margin: 0px; 
  }
  .HorizLinks li {
      margin: 0px 15px 0px 0px;
      list-style-type: none;
      display: inline;
  }
  </code></pre>
  
  <p>This is the <strong>HTML</strong> on the webpage:</p>
  
  <pre><code>&lt;div id="container"&gt;&lt;/div&gt;
  &lt;div id="header"&gt;&lt;/div&gt;
  &lt;div class="HorizLinks"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.website.com"&gt;Header Link 1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://www.website.com"&gt;Header Link 2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>