How do I center a font awesome icon inside of a button?
<p>I am trying to create a small button with a X (font-awesome's <code>&lt;i class="fa fa-close"&gt;&lt;/i&gt;</code>).  I am trying to make it look something like this:</p>

<p><a href="https://i.stack.imgur.com/5wHDu.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/5wHDu.jpg" alt="enter image description here"></a></p>

<p>However, I am facing some issues with getting the X centered inside the button.</p>

<p>Here is the markup:</p>

<pre><code>&lt;button class="cart-remove"&gt;
  &lt;i class="fa fa-close"&gt;&lt;/i&gt;
&lt;/button&gt;
</code></pre>

<p>And the css:</p>

<pre><code>.cart-remove {
    width: 20px;
    height: 20px;
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #fff;
    border-radius: 50%;
    text-align: center !important;
}
</code></pre>

<p>Unfortunately the font-awesome close icon does not center, it appears at the bottom right.  How can I fix this?  I thought text-align center centers the stuff inside that element?</p>

<p>Thanks</p>