title: How to center scrollbar?
body: <p>how is it possible to center a div's scrollbar?</p>
  
  <p>This is what I have:</p>
  
  <pre><code>&lt;div id="mydiv" style="width:1000px;overflow:auto;"&gt;
     &lt;img src="..." style="width:100%;height:250px;" /&gt;
  &lt;/div&gt;
  
  $(window).on('resize', function () {
      $('#mydiv').scrollLeft(
              $( "#mydiv" ).width() - $( "#mydiv" ).width()/2
      );
  });
  </code></pre>
  
  <p>But this doesn't work. It is not exactly centering. Too bad I can't set percent 50%. The scrollLeft(() function requires an integer.</p>
  
  <p>Thanks!</p>