20 of the best prompts for fixing mobile responsiveness issues, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.
20 of the best prompts for fixing mobile responsiveness issues, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.
Published June 28, 2026
Windsurf sometimes introduces styles that work on desktop but break mobile layouts. This can lead to a poor user experience on mobile devices. These prompts help developers diagnose, fix, and prevent such issues efficiently. This guide walks you through every stage of Fixing Mobile Responsiveness Issues, from Diagnose the Wall all the way through Prevent Recurrence, with a curated, copy-ready prompt at each step. Each stage targets a specific phase of the process so you always know exactly what to ask and what output to expect. Works with ChatGPT, Claude, and Gemini and any other major AI tool.
Identify which styles or layout changes are causing issues on mobile devices.
Check Recent Style Changes
Please provide a detailed list of all recent CSS changes made to the project. For each change, indicate whether it specifically targets desktop layouts and explain how it could potentially impact mobile responsiveness. Additionally, categorize the changes based on their purpose, such as layout adjustments, styling enhancements, or media queries, and include examples of how these changes might affect the user experience on mobile devices.
Analyze Media Queries
Please analyze the CSS code for media queries in my project. Identify any media queries that are missing or incorrectly configured for optimal mobile responsiveness. Provide a detailed report that includes the specific lines of code where issues are found, suggestions for corrections, and explanations of how these changes will improve the mobile viewing experience. Additionally, outline best practices for setting up media queries to ensure compatibility across various devices.
Inspect Layout Breakpoints
Please examine the layout breakpoints defined in the CSS for the website. Identify any specific breakpoints that may be causing layout issues on smaller screens, and provide detailed explanations for each one. Include suggestions for how to adjust these breakpoints to improve mobile responsiveness. Additionally, outline any potential impacts these changes may have on the overall design and user experience.
Evaluate Flexbox and Grid Usage
Please evaluate the use of Flexbox and Grid in the CSS of my website. Identify specific configurations that may not adapt well to mobile screens and explain why they could cause issues. Provide suggestions for adjustments or alternatives that would improve mobile responsiveness. Additionally, include examples of best practices for using Flexbox and Grid effectively in a mobile context.
Review JavaScript for Responsive Behavior
Please review the JavaScript code for the project related to [PROJECT NAME] and identify any scripts that may be affecting the layout and mobile responsiveness. Provide a detailed analysis of each script, explaining how it interacts with the layout and any potential conflicts that could arise on mobile devices. Additionally, suggest possible solutions or adjustments to improve mobile responsiveness based on your findings. Format your response as a structured report with sections for each identified script, including code snippets and recommendations.
Focus on correcting the identified issues to restore mobile responsiveness.
Adjust Media Queries
Please analyze the current media queries in the CSS for the website and suggest specific adjustments to enhance mobile responsiveness. Focus on targeting devices with screen widths of [SCREEN WIDTH] pixels or less. Include recommendations for breakpoints, any necessary changes to font sizes, layout adjustments, and how to optimize images for mobile. Provide a clear explanation of how each change will improve the user experience on mobile devices.
Refactor CSS for Mobile
Please refactor the CSS rules that are currently causing issues on mobile devices. Focus on optimizing the styles for both mobile and desktop views to ensure a seamless user experience across all screen sizes. Identify specific CSS properties that need adjustments, such as font sizes, margins, padding, and layout structures. Provide a clear explanation of the changes made and how they improve responsiveness. Additionally, include any best practices for maintaining mobile compatibility in future updates.
Correct Flexbox and Grid Issues
Identify and correct any Flexbox or Grid configurations that are not displaying properly on mobile devices for the layout of [WEBSITE NAME]. Analyze the current structure and provide detailed suggestions for adjustments to ensure a responsive design. If certain elements are not aligning as intended, propose alternative layouts that maintain usability and aesthetic appeal. Include specific CSS code examples for the recommended changes and explain how these adjustments will improve the mobile experience.
Remove Conflicting Styles
Identify any conflicting styles between the desktop and mobile views of my website. Analyze the CSS and layout for both versions, and list the specific styles that are causing discrepancies. Then, propose a unified style solution that ensures consistency across both platforms, detailing the changes needed and how they will improve the overall responsiveness and user experience. Format your response in a clear, structured manner, highlighting the key areas of conflict and the recommended adjustments.
Update JavaScript for Responsiveness
Please review the existing JavaScript code for the project related to [PROJECT NAME] and identify specific adjustments required to enhance mobile responsiveness. Outline the key changes that need to be made, including any functions or event listeners that should be modified or added. Additionally, provide a brief explanation of how these changes will improve the user experience on mobile devices. Format your response as a detailed list of changes with code snippets where applicable.
Ensure that the applied fixes have resolved the mobile responsiveness issues.
Test on Mobile Devices
Please test the layout of my website on various mobile devices to confirm its responsiveness. I would like you to check how the design adapts to different screen sizes, including smartphones and tablets. Provide detailed feedback on any remaining issues, such as elements that do not align properly, text that is difficult to read, or buttons that are not clickable. Additionally, suggest improvements to enhance the mobile user experience, and summarize your findings in a clear report.
Validate Media Query Effectiveness
Please validate the effectiveness of the media queries for mobile viewports in my web design. Check if the styles are being correctly applied across different mobile resolutions, specifically focusing on [SPECIFIC DEVICES OR SCREEN SIZES]. Confirm whether the layout adjusts as expected, ensuring that elements are properly aligned and visually appealing. Provide a detailed report on any issues found, including suggestions for improvements or adjustments needed to enhance mobile responsiveness.
Confirm Flexbox and Grid Functionality
Please verify that the Flexbox and Grid layouts are displaying correctly on mobile devices. Check for any discrepancies in alignment, spacing, and responsiveness across various screen sizes, including [SCREEN SIZE 1], [SCREEN SIZE 2], and [SCREEN SIZE 3]. If any issues are found, provide a detailed report outlining the specific problems, including screenshots if necessary, and suggest potential fixes for each discrepancy identified.
Check for Style Conflicts
Please analyze the current styles applied to both the desktop and mobile versions of my website. Identify any style conflicts that may cause discrepancies in appearance between the two views. Provide a detailed report highlighting specific areas where styles differ, along with suggestions for resolving these conflicts to ensure a consistent and visually appealing experience across all devices. Include examples of the affected elements and recommend best practices for maintaining responsive design.
Review JavaScript Impact
Evaluate the impact of recent JavaScript changes on the mobile responsiveness of the website. Analyze how these scripts affect the layout across various mobile devices and screen sizes. Identify any specific layout issues that arise due to these changes and provide recommendations for adjustments or fixes. Please summarize your findings in a detailed report, including examples of any problems encountered and suggested solutions to enhance mobile usability.
Create mechanisms to avoid future mobile responsiveness issues.
Create a CLAUDE.md Rule
Draft a new rule for a CLAUDE.md file that ensures media queries are consistently included for mobile views in web design. The rule should specify the importance of responsive design and outline the required breakpoints for various screen sizes, such as mobile, tablet, and desktop. Include examples of how to implement these media queries in CSS, and explain the potential issues that can arise if they are omitted. Additionally, provide guidelines on testing for mobile responsiveness to ensure compliance with this rule.
Add Responsive Design Comments
Please add detailed comments in the CSS code to emphasize responsive design principles. Identify and explain key areas that developers should focus on to ensure mobile compatibility, including specific media queries, flexible grid layouts, and scalable images. Each comment should provide clear guidance on why these principles are important and how they can be effectively implemented. Aim for a thorough review that covers at least five different sections of the CSS, ensuring that the comments are informative and actionable for future reference.
Develop a Checklist for Mobile Testing
Create a comprehensive checklist for developers to use before committing changes to ensure mobile responsiveness. The checklist should include specific steps for testing on various mobile devices, such as checking layout adjustments, ensuring touch elements are appropriately sized, verifying font readability, and testing load times. Additionally, include guidelines for testing across different browsers and operating systems to ensure compatibility. Format the checklist in a clear, organized manner with sections for each type of test, and aim for a total of at least 15 items to cover all essential aspects of mobile testing.
Establish Naming Conventions
Please propose a set of naming conventions for CSS classes that clearly indicate their intended purpose for both mobile and desktop layouts. The conventions should help prevent misuse and confusion among developers. Include examples of class names that reflect their functionality, such as layout, visibility, and styling. Additionally, explain the rationale behind the naming choices and how they contribute to better code organization and maintainability.
Implement a Project Guard
Help me implement a project guard that automatically flags changes in my project that could impact mobile responsiveness. Identify specific criteria that should be monitored, such as changes in CSS styles, alterations to HTML structure, or updates to JavaScript functionality that could affect layout. Additionally, outline a process for how these flags should be reported and prioritized for review, including any tools or methods for tracking these changes over time. Provide a detailed plan that ensures mobile responsiveness is maintained throughout the project lifecycle.
Windsurf's Cascade mode can make autonomous edits that prioritize desktop styles, inadvertently affecting mobile layouts. Understanding how it applies changes helps in configuring rules to prevent this.
Use media queries to target different screen sizes and test your layout on various devices. Windsurf can help identify missing or incorrect media queries.
JavaScript can dynamically adjust layouts, but incorrect scripts might disrupt mobile views. Windsurf can review scripts to ensure they support responsive design.
Use the CLAUDE.md file to define specific rules for your project. Windsurf will reference this file to align its edits with your requirements.
While Windsurf doesn't simulate devices, it can guide you through setting up tests and identifying potential issues across various screen sizes.
AI Prompts for Fix Mobile Layout Breakage
The mobile viewport layout is breaking due to styles or layout code that only works on desktop.
See promptsAI Prompts for Fix Mobile Responsiveness Issues
The AI is adding styles that work on desktop but disrupt the mobile viewport layout.
See promptsAI Prompts for Fix Mobile Responsiveness Issues
The tool is generating styles that work on desktop but break the mobile layout, causing a poor user experience.
See prompts