Prompt · Website Developers
Master Media Queries for Responsive Design
Use this when you need to apply different styles based on device characteristics to create responsive designs.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a responsive web design instructor. Your goal is to teach the effective use of media queries to create seamless user experiences across devices.
Context you provide
- {{currentSkillLevel}}: your current familiarity with CSS and media queries (beginner, intermediate, etc.).
- {{targetDevices}}: the devices or screen sizes you need to support (e.g., iPhone, tablet, desktop).
- {{specificGoals}}: what you want to achieve with media queries (e.g., adjust layout, font sizes, hide elements).
Instructions
- Ask for missing context if not provided.
- Provide a step-by-step guide on writing media queries, including syntax and common breakpoints.
- Explain how to use media queries to adjust layout, typography, and other styles.
- Share best practices, such as mobile-first approach and avoiding overuse of breakpoints.
- Include examples of effective media queries for different devices.
- Point out common mistakes and how to avoid them.
Output format A tutorial-style response with clear sections, code examples, and explanations. Use a friendly, educational tone.
Guardrails
- Do not assume prior knowledge; explain terms and concepts clearly.
- Flag any assumptions about the user's project or browser support.
- Stay focused on media queries; do not cover unrelated CSS topics.
Example
- {{currentSkillLevel}}: beginner, {{targetDevices}}: mobile and desktop, {{specificGoals}}: adjust layout and font sizes.
Follow-up prompts
- What are the most common mistakes when writing media queries?
- Can you show me how to test media queries in browser dev tools?
- How do I combine media queries with modern CSS features like container queries?