# Prevent horizontal scrolling > Web pages must not require horizontal scrolling at standard viewport widths. Horizontal overflow breaks responsive layouts and makes content inaccessible to low-vision users who zoom in. **Priority:** medium · **Difficulty:** intermediate · **Time:** 10 min --- Pages should not require horizontal scrolling at any standard viewport width. Horizontal overflow is especially harmful for users who rely on browser zoom or screen magnification software. ## Code Examples ### Fixed-width containers ```css /* ❌ Problem: fixed width causes overflow on small screens */ .container { width: 1200px; } /* ✅ Fix: max-width with full fluid width */ .container { max-width: 1200px; width: 100%; } ``` ### Images and media without max-width ```css /* ❌ Problem: intrinsic image width overflows container */ img { /* no width constraints */ } /* ✅ Fix: images constrained to their container */ img, video, iframe, embed, object { max-width: 100%; height: auto; } ``` ### Long unbreakable strings ```css /* ❌ Problem: long URLs or code strings overflow text containers */ .content { /* no word-break rules */ } /* ✅ Fix: allow breaking of long words */ .content { overflow-wrap: break-word; word-break: break-word; /* fallback for older browsers */ } ``` ### width: 100vw causes overflow ```css /* ❌ Problem: 100vw includes scrollbar width, causing horizontal overflow */ .hero { width: 100vw; } /* ✅ Fix: use 100% relative to the parent */ .hero { width: 100%; } ``` ### Data tables ```html