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.

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. Omar Faruk Omar Faruk As a Product Engineer at Klasio, I contributed to end-to-end product development, focusing on scalability, performance, and user experience. My work spanned building and refining core features, developing dynamic website templates, integrating secure and reliable payment gateways, and optimizing the overall system architecture. I played a key role in creating a scalable and maintainable platform to support educators and learners globally. I'm enthusiastic about embracing new challenges and making meaningful contributions. Prakash Prajapati Prakash Prajapati I’m a Senior Python Developer specializing in building secure, scalable, and highly available systems. I work primarily with Python, Django, FastAPI, Docker, PostgreSQL, and modern AI tooling such as PydanticAI, focusing on clean architecture, strong design principles, and reliable DevOps practices. I enjoy solving complex engineering problems and designing systems that are maintainable, resilient, and built to scale. Basel Issmail Basel Issmail ’m a Senior Full-Stack Developer and Tech Lead with experience designing and building scalable web platforms. I work across the full development lifecycle, from translating business requirements into technical architecture to delivering reliable production systems. My work focuses on modern web technologies, including TypeScript, Angular, Node.js, and cloud-based architectures. I enjoy solving complex technical problems and helping teams turn product ideas and prototypes into working platforms that can grow and scale. In addition to development, I often collaborate closely with product managers, business analysts, designers, and QA teams to ensure that solutions align with both technical and business goals. I enjoy working with startups and product teams where I can contribute both as a hands-on engineer and as a technical partner in designing and delivering impactful software. Matt Butler Matt Butler Software Engineer @ AWS Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Milan Surelia Milan Surelia Milan Surelia is a Mobile App Developer with 5+ years of experience crafting scalable, cross-platform apps at 7Span and Meticha. At 7Span, he engineers feature-rich Flutter apps with smooth performance and modern UI. As the Co-Founder of Meticha, he builds open-source tools and developer-focused products that solve real-world problems. Expertise: 💡 Developing cross-platform apps using Flutter, Dart, and Jetpack Compose for Android, iOS, and Web. 🖋️ Sharing insights through technical writing, blogging, and open-source contributions. 🤝 Collaborating closely with designers, PMs, and developers to build seamless mobile experiences. Notable Achievements: 🎯 Revamped the Vepaar app into Vepaar Store & CRM with a 2x performance boost and smoother UX. 🚀 Launched Compose101 — a Jetpack Compose starter kit to speed up Android development. 🌟 Open source contributions on Github & StackOverflow for Flutter & Dart 🎖️ Worked on improving app performance and user experience with smart solutions. Milan is always happy to connect, work on new ideas, and explore the latest in technology. Dor Yaloz Dor Yaloz SW engineer with 6+ years of experience, I worked with React/Node/Python did projects with React+Capacitor.js for ios Supabase expert 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.

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