title: How to calculate percentages in LESS CSS?
body: <p>I would like to calculate the width of child-container (div etc) in percentages depending on the parent container with <a href="http://lesscss.org">LESS CSS</a>.</p>
  
  <p>I am using the forumula by Ethan Marcotte: <em>target / context = result</em>.</p>
  
  <p>Parent container: 620px
  <br>Child container: 140px</p>
  
  <p>I am using this calculation:</p>
  
  <pre><code>div.child-container {
      width: (140/620)*100%;
  }
  </code></pre>
  
  <p>However the output is:</p>
  
  <pre><code>div.child-container {
      width: 0.2258064516129;
  }
  </code></pre>
  
  <p>I would like to move the decimal point two digits and add the %, like this:</p>
  
  <pre><code>div.child-container {
      width: 22.58064516129%;
  }
  </code></pre>
  
  <p>Any hints greatly appreciated.</p>