title: Get height of element and use it in css
body: <p>I have an <code>div</code> element on my page that contains a <code>p</code> element.</p>
  
  <pre><code>&lt;div class="parent-div"&gt;
  
      &lt;p&gt;Here's some text&lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to get the outer height of the <code>p</code> element, and then use that number to apply a margin to the parent element.</p>
  
  <p>e.g if the height of the <code>p</code> element is 346px, then I'd like to apply a 346px margin-top to the parent <code>div</code>.</p>
  
  <p>I can get the height using jQuery's <code>outerHeight()</code>, but I have no idea how to use that number to apply a margin to the parent element.</p>
  
  <p>Any advice is much appreciated. </p>