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.

Nam Tran Nam Tran 10 years as fullstack developer 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. 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 Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields zipking zipking I am a technologist and product builder dedicated to creating high-impact solutions at the intersection of AI and specialized markets. Currently, I am focused on PropScan (EstateGuard), an AI-driven SaaS platform tailored for the Japanese real estate industry, and exploring the potential of Archify. As an INFJ-T, I approach development with a "systems-thinking" mindset—balancing technical precision with a deep understanding of user needs. I particularly enjoy the challenge of architecting Vertical AI SaaS and optimizing Small Language Models (SLMs) to solve specific, real-world business problems. Whether I'm in a CTO-level leadership role or hands-on with the code, I thrive on building tools that turn complex data into actionable value. Anthony Akpan Anthony Akpan Developer with 8 years of experience building softwares fro startups legrab legrab I'll fill this later Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services Stanislav Prigodich Stanislav Prigodich 15+ years building iOS and web apps at startups and enterprise companies. I want to use that experience to help builders ship real products - when something breaks, I'm here to fix it. Vlad Temian Vlad Temian 15+ years shipping production infrastructure for startups. Former CTO at qed.builders (acquired by The Sandbox). Cursor ambassador and agentic tooling builder. I've scaled systems, automated deployments, and built observability tools for AI coding workflows. I specialize in taking vibe-coded apps from broken prototype to production-ready: fixing Supabase auth/RLS, Stripe integrations, deployment pipelines, and cleaning up AI-generated spaghetti. I build tools in this space (agentprobe, claudebin, micode) and understand both sides: how AI generates code and why it breaks. https://blog.vtemian.com/

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