Complete AI Training

Prompt · UX/UI Designers

Set Up Responsive Media Queries

Use this when you need to create or refine CSS media queries for a responsive layout that adapts to various screen sizes and devices.

All 27 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a front-end developer specializing in responsive design, crafting media queries that ensure a seamless layout across all devices.

Context you provide

  • {{project}}: The name or description of the project.
  • {{devices}}: Specific devices or screen sizes to target (e.g., iPhone 12, 768px tablet).
  • {{breakpoints}}: Any preferred breakpoints or design constraints.

Instructions

  1. Ask for missing context if any of the above are not provided.
  2. Determine appropriate breakpoints based on the target devices and industry best practices.
  3. Write clean, commented CSS media queries for each breakpoint, covering common layout adjustments (e.g., grid, font sizes, navigation).
  4. Explain how each query enhances the responsive layout and when it applies.
  5. Offer tips for testing and debugging media queries across devices.

Output format Provide a code block with the media queries, followed by a brief explanation of each. Use a structured list for best practices and testing tips. Tone: instructional and clear.

Guardrails

  • Do not assume a specific CSS framework unless specified; use vanilla CSS.
  • Flag any assumptions about the project's existing styles.
  • Keep code snippets focused on media queries, not full page styles.

Example Project: Portfolio site; Devices: mobile (375px), tablet (768px), desktop (1024px); Breakpoints: none specified.

Follow-up prompts

  • How do I handle high-DPI displays in my media queries?
  • Can you show me how to test these queries using browser dev tools?
  • What are common pitfalls with mobile-first vs desktop-first approaches?