title: SVG viewBox attribute places shape outside artboard in Illustrator
body: <p>I am writing an <code>SVG</code> file that fits the shapes inside an artboard, by using the <a href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" rel="nofollow noreferrer">viewBox</a> attribute. In Inkscape, the shapes are inside the artboard. But in Adobe Illustrator, the shape is placed above the artboard (vertically). How should I make the art fit for any software the SVG is going to be opened with?</p>
  
  <p>The shape below forms the <code>Z</code> character. The svg code :    </p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" 
   width="22.640625" height="28.640625" viewBox="0.796875 -28.640625 22.640625 28.640625" &gt;
  &lt;path d=" M 0.796875, 0.0 L 0.796875, -3.515625 L 15.46875, -21.859375 Q 17.03125, -23.8125 18.4375, -25.25
   L 2.46875, -25.25 L 2.46875, -28.640625 L 22.96875, -28.640625 L 22.96875, -25.25 L 6.890625, -5.390625
   L 5.15625, -3.375 L 23.4375, -3.375 L 23.4375, 0.0 L 0.796875, 0.0 Z"/&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <p>And the appearance in Illustrator:</p>
  
  <p><img src="https://i.stack.imgur.com/Lx69F.png" alt="letter Z on top of the artboard in Illustrator"></p>