title: Find element that is causing the showing of horizontal scrollbar in Google Chrome
body: <p>When I size my Chrome window to 328 x 455 pixels I still see a horizontal scrollbar.
  How can I find out which element is causing this? I've been looking at elements via the developer console, but can't find the element.</p>
  <p>I then tried the script I found <a href="https://stackoverflow.com/questions/14146356/which-element-is-causing-the-horizontal-scrollbar-automated-detection">here</a>, but nothing is logged.
  I tried it on element <code>body</code>, <code>section1</code> and a bunch of others but don't know what else to do.</p>
  <pre><code>    $(function () {
          var f = $('body'); //document.getElementById(&quot;body&quot;);
          var contentHeight = f.scrollHeight;
          var declaredHeight = $(f).height();
  
          var contentWidth = f.scrollWidth;
          var declaredWidth = $(f).width();
          if (contentHeight &gt; declaredHeight) {
              console.log(&quot;invalid height&quot;);
          }
          if (contentWidth &gt; declaredWidth) {
              console.log(&quot;invalid width&quot;);
          }
      });
  </code></pre>