Mobile · Usability
Content wider than the viewport
A box on this page is fixed at 1,200 pixels wide, wider than any phone screen, so visitors must scroll sideways to read all of it.
How this page is built
The box below has a fixed width of 1,200 pixels set in CSS, and nothing stops it growing past the edge of the screen. On a phone, or in a narrow browser window, the page scrolls sideways.
This box is 1,200 pixels wide. On a small screen, its right-hand side is off the edge of the page, and you have to scroll sideways to read the end of each line.
Why it matters
Phones show pages in a narrow column, and visitors expect to scroll only up and down. When one element is wider than the screen, the whole page can be dragged sideways, and text may be cut off at the edge. That makes the page awkward to read and use.
Google indexes the mobile version of pages, and Lighthouse checks whether content fits the viewport. Wide content usually comes from fixed widths, large images without a maximum width, wide tables or long unbroken strings such as URLs.
How to check it
Open the page on a phone, or in a browser’s device mode, and try scrolling sideways. Lighthouse reports content that is not sized for the viewport. In the browser’s developer tools, look for elements whose width is greater than the width of the page.
How to fix it
Replace fixed widths with flexible ones, such as max-inline-size: 100%. Let wide tables scroll inside their own container, and allow long strings to wrap with overflow-wrap: break-word.