html prevent page scrol left right code example Example: how to keep page from scrolling sideways html, body { max-width: 100%; overflow-x: hidden; }