title: Shortening a link using HTML/JS/CSS
body: <p>I am trying to change the design of the navigation on my site.</p>
  
  <p>We have some products with really long names and I want to cut them short and maybe add (...) or something similar at the end.</p>
  
  <p>So something like this should look like <code>abcdefg...</code> instead of <code>abcdefghijklmnopqrstuvwxyz</code></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>a{
    width:50px;
    overflow:hidden;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;a href="#"&gt;abcdefghijklmnopqrstuvwxyz&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>A JS solution is welcome.</p>
  
  <p>I would also like to know why the width isn't being applied?</p>