Skip to content
Learn Measure Blog Case studies About
On this page
  • How the Lighthouse content width audit fails
  • How to make your page fit on mobile screens
  • Resources

Content is not sized correctly for the viewport

May 4, 2019 — Updated Sep 19, 2019
Available in: Español, Português, English
Appears in: PWA audits
On this page
  • How the Lighthouse content width audit fails
  • How to make your page fit on mobile screens
  • Resources

The viewport is the part of the browser window in which your page's content is visible. When your page's content width is smaller or larger than the viewport width, it may not render correctly on mobile screens. For example, if the content width is too large, content may be scaled down to fit, making text difficult to read.

How the Lighthouse content width audit fails #

Lighthouse flags pages whose width isn't equal to the width of the viewport:

Lighthouse audit showing content not correctly sized for viewport

The audit fails if window.innerWidth does not equal window.outerWidth.

In the Lighthouse report UI the full PWA badge is given when you pass all of the audits in all of the PWA subcategories (Fast and reliable, Installable, and PWA optimized).

How to make your page fit on mobile screens #

This audit is a roundabout way of determining if your page is optimized for mobile devices. See Google's Responsive Web Design Basics for an overview of how to create a mobile-friendly page.

You can ignore this audit if:

  • Your site does not need to be optimized for mobile screens.
  • The content width of your page is intentionally smaller or larger than the viewport width.

Resources #

  • Source code for Content is not sized correctly for the viewport audit
  • Responsive Web Design Basics
Last updated: Sep 19, 2019 — Improve article
Return to all articles
Share
subscribe

Contribute

  • File a bug
  • View source

Related content

  • developer.chrome.com
  • Chrome updates
  • Web Fundamentals
  • Case studies
  • Podcasts
  • Shows

Connect

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms & Privacy
  • Community Guidelines

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.