title: How do I vertically center the text in a <li> without affecting the list bullet?
body: <p>I am trying to build a simple website, the HTML is like this:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="l1"&gt;Test item 1&lt;/li&gt;
      &lt;li class="l2"&gt;Test item 2&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rFcT2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rFcT2.png" alt="enter image description here"></a></p>
  
  <p>You can see the text does not align with the bullets.
  Here is what I tried:</p>
  
  <pre><code>ul{
    display: table;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>li{
    display: table-cell;
    text-align:middle;
  }
  </code></pre>
  
  <p>But the bullets disappeared:
  <a href="https://i.stack.imgur.com/aFPuy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aFPuy.png" alt="enter image description here"></a></p>
  
  <p>So I wanna ask if there are any ways to vertical center the text in the list item  without affecting the bullets? </p>