title: CSS: How to center align a list element with left aligned text?
body: <p>I am attempting to center align a list within a div, but keeping the text left aligned.</p>
  
  <p>So, I want all the bullets lined up vertically (left aligned), but the entire list itself should be positioned in the center, as is the paragraph in my example below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container { width: 600px; padding: 2em; background: #eee; }
  .align-center { text-align: center; }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;p class="align-center"&gt;Center Align Test&lt;/p&gt;
    
    &lt;ul&gt;
      &lt;li&gt;First element&lt;/li&gt;
      &lt;li&gt;Second element&lt;/li&gt;
      &lt;li&gt;Finally, the third and final element&lt;/li&gt;
     &lt;/ul&gt;
   
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>