Created
January 5, 2017 20:11
-
-
Save williamdodson/392f149a717def0306f3043ed760347a to your computer and use it in GitHub Desktop.
Modified version of the JS trick found here: https://css-tricks.com/findingfixing-unintended-body-overflow/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var docWidth = document.documentElement.offsetWidth; | |
[].forEach.call( | |
document.querySelectorAll('*'), | |
function(el) { | |
if (el.offsetWidth > docWidth) { | |
el.style.border = "1px solid red"; | |
console.log(el); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment