title: Material table cells with specific width according to predefined length
body: <p>I will show my code first.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;ng-container matColumnDef=&quot;position&quot;&gt;
     &lt;th mat-header-cell *matHeaderCellDef&gt; No. &lt;/th&gt;
     &lt;td mat-cell *matCellDef=&quot;let element&quot;&gt; {{element.position}} &lt;/td&gt;
  &lt;/ng-container&gt;
  </code></pre>
  <p>Everything works fine, my requirement is to display text but just a fixed length of it. For example, if I have a text that is <code>50</code> characters long, the requirement is to display <code>40</code>. I have many cells in each row, many cells of fixed length.</p>
  <p>To clarify, here my difficulty is how to set width with some text length, I saw many examples but the column width was set in the CSS file. How can I achieve that? Thanks in advance.</p>