title: Getting width of an element defined in CSS in em
body: <p>I am having trouble getting the width of an element defined in CSS. I figured out how to get the CSS rules using Javascript, but I can't access the width. <strong>Menu</strong> is fixed width that I defined in CSS using <strong>em</strong>.</p>
  
  <p>I am trying to change the width of the <strong>div1</strong> based on the browser window minus the fixed <strong>menu width</strong>.</p>
  
  <p>Note: I already tried using <code>style.width</code>, but it returns a blank line in the console. </p>
  
  <p>jsfiddle: <a href="http://jsfiddle.net/kj6pQ/" rel="noreferrer">http://jsfiddle.net/kj6pQ/</a></p>
  
  <pre><code>var div1 = document.createElement('div'), 
  css = getMatchedCSSRules(document.getElementById('menu'));
  
  console.log(css); //works but dont' konw how to access width
  
  div1.style.width = window.innerWidth - &lt;!-- menu width --&gt;;
  </code></pre>