« /home/rc

JS snippet to debug HTML overflows

20/08/2020

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

overflowing HTML example