Cursor mobile

Viewport Meta Tag Misconfigured or Missing in Cursor Project

Your Cursor-generated web application appears zoomed out, zoomed in, or renders at an unexpected scale on mobile devices. Text might be tiny and unreadable, the page might show excessive whitespace, or users can't zoom in/out. The root cause is a missing, malformed, or incorrectly configured viewport meta tag.

The viewport meta tag is a single line of HTML that controls how mobile browsers render your page. Without it, mobile browsers assume your page is designed for a 980px desktop screen and shrink everything to fit. With incorrect values, you might lock users out of zooming (an accessibility violation) or cause the page to render at the wrong width.

This issue affects every mobile visitor to your site and is often the first thing that needs fixing for any mobile responsiveness improvements to take effect.

Error Messages You Might See

Viewport not set to device-width Lighthouse: Does not have a <meta name="viewport"> tag with width or initial-scale Accessibility violation: user-scalable=no prevents zooming Content wider than screen on mobile
Viewport not set to device-widthLighthouse: Does not have a <meta name="viewport"> tag with width or initial-scaleAccessibility violation: user-scalable=no prevents zoomingContent wider than screen on mobile

Common Causes

  • Viewport tag missing entirely — Cursor generated an HTML file or layout template without the viewport meta tag in the head section
  • Zoom disabled with user-scalable=no — Cursor added user-scalable=no or maximum-scale=1 which prevents pinch-to-zoom, violating WCAG accessibility guidelines
  • Fixed width viewport — The tag uses a fixed pixel width like width=1024 instead of width=device-width, forcing a specific layout width
  • Multiple viewport tags — Cursor added a viewport tag but one already exists from the framework/template, causing conflicts with the browser using the last one
  • initial-scale missing or wrong — Without initial-scale=1, some browsers may not properly set the viewport width on orientation change

How to Fix It

  1. Add the correct viewport tag — Place this in your HTML head: <meta name="viewport" content="width=device-width, initial-scale=1">. This is the recommended configuration for almost all web applications
  2. Remove zoom restrictions — Delete user-scalable=no, maximum-scale=1, and minimum-scale=1 from the viewport tag. Users must be able to zoom for accessibility
  3. Check for duplicate viewport tags — Search your entire HTML output for name="viewport". If there are multiple, remove all but one and place it correctly in the head
  4. Verify in framework layout files — For React (index.html), Next.js (app/layout.tsx or _document.tsx), or Svelte (app.html), check the root layout file where the viewport tag should live
  5. Test on real devices — Browser DevTools device simulation doesn't perfectly replicate viewport behavior. Test on actual phones to verify the fix

Real developers can help you.

rayush33 rayush33 JavaScript (React.js, React Native, Node.js) Developer with demonstrated industry experience of 4+ years, actively looking for opportunities to hone my skills as well as help small-scale business owners with solutions to technical problems Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Alvin Voo Alvin Voo I’ve watched the tech landscape evolve over the last decade—from the structured days of Java Server Pages to the current "wild west" of Agentic-driven development. While AI can "vibe" a frontend into existence, I specialize in the architecture that keeps it from collapsing. My expertise lies in the critical backend infrastructure: the parts that must be fast, secure, and scalable. I thrive on high-pressure environments, such as when I had only three weeks to architect and launch an Ethereum redemption system with minimal prior crypto knowledge, turning it into a major revenue stream. What I bring to your project: Forensic Debugging: I don't just "patch" bugs; I use tools like Datadog and Explain Analyzers to map out bottlenecks and resolve root causes—like significantly reducing memory usage by optimizing complex DB joins. Full-Stack Context: Deep experience in Node.js and React, ensuring backends play perfectly with mobile and web teams. Sanity in the Age of AI: I bridge the gap between "best practices" and modern speed, ensuring your project isn't just built fast, but built to last. Jen Jacobsen Jen Jacobsen I’m a Full-Stack Developer with over 10 years of experience building modern web and mobile applications. I enjoy working across the full product lifecycle — turning ideas into real, well-built products that are intuitive for users and scalable for businesses. I particularly enjoy building mobile apps, modern web platforms, and solving complex technical problems in a way that keeps systems clean, reliable, and easy to maintain. Nam Tran Nam Tran 10 years as fullstack developer legrab legrab I'll fill this later Victor Denisov Victor Denisov Developer Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services Taufan Taufan I’m a product-focused engineer and tech leader who builds scalable systems and turns ideas into production-ready platforms. Over the past years, I’ve worked across startups and fast-moving teams, leading backend architecture, improving system reliability, and shipping products used by thousands of users. My strength is not just writing code — but connecting product vision, technical execution, and business impact.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Is it ever okay to disable zooming?

Almost never. WCAG 2.1 Success Criterion 1.4.4 requires that users can zoom to 200%. The only exception might be a full-screen web game, but even then, accessibility guidelines recommend allowing zoom. Some mobile form interactions can be improved without disabling zoom entirely.

What if my framework already handles the viewport tag?

Many frameworks like Next.js, Nuxt, and SvelteKit include a viewport tag in their default templates. Check your framework's documentation and root layout file before adding another one. Having duplicate viewport tags can cause unpredictable behavior.

Related Cursor Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help