title: How to get xpos of a div's background image?
body: <p>I have a simple script which is meant to console.log the xpos of a div's background image but the console shows blank.</p>
  
  <p>This is what i have:</p>
  
  <pre><code>    var d = document.getElementById('div');
      console.log(d.style.backgroundPosition); //shows a blank line
      console.log(d.style.backgroundPosition.xpos); //undefined (obviously)
  </code></pre>
  
  <p>I'm curious why backgroundPosition is coming out blank though?</p>
  
  <p>The div's CSS is:</p>
  
  <pre><code> #div{
      background-image: url('test.png');
      background-repeat: no-repeat;
      width:50px;
      height:50px;
      background-position: 0px 0px;
   }
  </code></pre>
  
  <p>The html as requested:</p>
  
  <pre><code>&lt;body&gt;   
      &lt;div id="div"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Any ideas ?</p>