title: How to manipulate svg foreign object html text wrapping and positioning?
body: <p>So I'm making a photo frame designer. Instead of a fiddle have the website as it's so much easier. <a href="http://dunnrite.co.uk/frame" rel="nofollow noreferrer">Here it is.</a></p>
  
  <p>Basically on the text input it prints the text to the SVG frame which uses an embedded foreign object tag so I can access it's auto text wrap. The problem comes with the positioning of the text. When the words are on two lines the positioning is correct. However whilst on a single line, the text is too high. I need it to be center between the photo slots and the bottom of the frame. This can be done easily by adjusting the foreign object's "y" value. However this then causes the two line text to be two low and out of position. I have no idea how I can fix this. Perhaps jQuery or javascript? Thanks.</p>
  
  <p>The code:</p>
  
  <pre><code>&lt;foreignObject x="78" y="460" width="1100" height="220" style="color:white;text-align:center"&gt;
         &lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
             &lt;p id="text"&gt;Your words here&lt;/p&gt;
         &lt;/body&gt;
      &lt;/foreignObject&gt;
  </code></pre>