title: How to right align numbers in the center of a table cell?
body: <p>Given a table with a column that contains numbers, I'd like to position them in the center. </p>
  
  <p>But, I'd like to <strong>right-align the numbers</strong> as well!</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>table {
    border: 1px solid black;
  }
  
  th {
    width: 200px;
  }
  
  td {
    text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Amount&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;45&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;2&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;18923538273&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;9823&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Outputs:</p>
  
  <p><a href="https://i.stack.imgur.com/tMSPu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tMSPu.png" alt="enter image description here"></a></p>
  
  <p>Desired output:</p>
  
  <p><a href="https://i.stack.imgur.com/xca3Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xca3Q.png" alt="enter image description here"></a></p>
  
  <p><strong>Note:</strong> The table cell width should be constant (200px), regardless of the numbers. For example, if all numbers are 0, they all should be in the center of the table:</p>
  
  <p><a href="https://i.stack.imgur.com/DcsXT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DcsXT.png" alt="enter image description here"></a></p>
  
  <p><strong>Also:</strong> </p>
  
  <ul>
  <li>You are allowed to modify the content of the <code>&lt;td&gt;</code>s, but there should be one number per <code>&lt;tr&gt;</code>.</li>
  <li>CSS only, please.</li>
  </ul>