Skip to content

css

finding unintended body overflow

with the page on screen, open the browser console, and run this code

var docWidth = document.documentElement.offsetWidth;

[].forEach.call(
  document.querySelectorAll('*'),
  function(el) {
    if (el.offsetWidth > docWidth) {
      console.log(el);
    }
  }
);

look the faulty elements on console

reference: Finding/Fixing Unintended Body Overflow