title: how to resize a large svg to fit inside a div
body: <p>I have the following div inside <code>&lt;body&gt;</code>.</p>
  
  <pre><code>&lt;div style="width:320px; height:480px;"&gt;
      &lt;svg id="svg1"&gt;&lt;/svg&gt;            
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to fit a 640X480 svg inside this div. I have tried this:</p>
  
  <pre><code>var paper=Snap("#svg1");
  Snap.load("somesvg.svg",function(f){ 
   paper.append(f);
   }); 
   paper.attr({ 
   width:320, height:480
   }) 
  </code></pre>
  
  <p>But the svg is cut off from the right size. </p>