Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

overflow css

const findOverflows = () => {
      const documentWidth = document.documentElement.offsetWidth;

      document.querySelectorAll('*').forEach(element => {
        const box = element.getBoundingClientRect();

        if (box.left < 0 || box.right > documentWidth) {
          console.log(element);
          element.style.border = '1px solid red';
        }
      });
    };

    // Execute findOverflows to find overflows on the page.
    findOverflows()
Source by www.webtips.dev #
 
PREVIOUS NEXT
Tagged: #overflow #css
ADD COMMENT
Topic
Name
2+6 =