title: Can I easily "set" an element's offsetWidth?
body: <p><em>Note: I know offsetWidth is read only</em></p>
  
  <p>I'm trying to make a pop-up 'div' overlay a <code>tr</code> element with the exact same width.</p>
  
  <p>However, I am stumped as to how to set my <code>div</code>'s <code>width</code> so that its <code>offsetWidth</code> is the exact same as the <code>tr</code>.</p>
  
  <p>The calculation would look something like:</p>
  
  <pre><code>div.width = tr.offsetWidth - div.paddingWidth - div.marginWidth
  </code></pre>
  
  <p>but surely there's a better way (since I can only think of getting the padding and margin offsets in groups of two...)</p>
  
  <p>Specifically, I'd like an answer for YUI 2 if possible.</p>