Is not unusual when you’re adapting a desktop design to smaller devices to have some hidden element overflowing your viewport in the x-axis and causing this annoying and undesirable horizontal scroll. Sometimes it’s not easy to find the element that is breaking the layout, especially if you’re working on some legacy codebase you don’t really know. In those cases, I use this Javascript snippet to help me identify which element(s) are to blame.