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.

Pratik Pratik SWE with 15+ years of experience building and maintaining web apps and extensive BE infrastructure Franck Plazanet Franck Plazanet I am a Strategic Engineering Leader with over 8 years of experience building high-availability enterprise systems and scaling high-performing technical teams. My focus is on bridging the gap between complex technology and business growth. Core Expertise: 🚀 Leadership: Managing and coaching teams of 15+ engineers, fostering a culture of accountability and continuous improvement. 🏗️ Architecture: Enterprise Core Systems, Multi-system Integration (ERP/API/ETL), and Core Database Structure. ☁️ Cloud & Scale: AWS Expert; architected systems handling 10B+ monthly requests and managing 100k+ SKUs. 📈 Business Impact: Aligning tech strategy with P&L goals to drive $70k+ in monthly recurring revenue. I thrive on "out-of-the-box" thinking to solve complex technical bottlenecks and am always looking for ways to use automation to improve business productivity. Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) Simon A. Simon A. I'm a backend developer building APIs, emulators, and interactive game systems. Professionally, I've developed Java/Spring reporting solutions, managed relational and NoSQL databases, and implemented CI/CD workflows. 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 Anthony Akpan Anthony Akpan Developer with 8 years of experience building softwares fro startups Rudra Bhikadiya Rudra Bhikadiya I build and fix web apps across Next.js, Node.js, and DBs. Comfortable jumping into messy code, broken APIs, and mysterious bugs. If your project works in theory but not in reality, I help close that gap. MFox MFox Full-stack professional senior engineer (15+years). Extensive experience in software development, qa, and IP networking. BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years.

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