Media query: plainly explained.

A media query applies CSS styles only when conditions like screen width are met. How it works, common breakpoints and the mobile-first approach.

Design · Updated Nov 7, 2026

DEFINITION

A media query is a CSS feature that applies styles only when conditions like screen width are met, making a site responsive on phones, tablets and desktops.

CATEGORY

Design

RELATED

Responsive design, Flexbox

Summarize this page with AI

A media query is a CSS feature that applies a set of styles only when the browsing environment matches certain conditions, most often the width of the screen. It is the core mechanism behind responsive design: the same HTML looks right on a phone, a tablet and a desktop because different rules apply at different sizes.

01

How a media query works

A media query wraps CSS rules in a condition introduced by @media. When the condition is true, the styles inside apply; when it is false, they are ignored.

  • @media (min-width: 768px) { ... } applies from 768px and up.
  • @media (max-width: 767px) { ... } applies up to 767px.
  • Conditions combine with and, commas (meaning or) and not.
02

What you can target

Width is the most common feature, but a media query can respond to much more.

  • orientation: portrait or landscape.
  • min-resolution: high-density (retina) screens.
  • prefers-color-scheme: light or dark mode.
  • prefers-reduced-motion: users who want less animation.
  • print: dedicated styles for the printed page.
03

Common breakpoints

Most teams define a small, standard set rather than one per device.

Device
MobileRangeup to 767pxCommon querymax-width: 767px
TabletRange768 to 991pxCommon querymin-width: 768px
DesktopRange992px and upCommon querymin-width: 992px
Large desktopRange1280px and upCommon querymin-width: 1280px
04

Mobile-first versus desktop-first

Mobile-first writes the base styles for small screens, then adds complexity with min-width queries. Desktop-first starts wide and scales down with max-width. Mobile-first tends to produce lighter CSS and matches how Google crawls the mobile version first.

05

Media queries, SEO and modern CSS

Because Google uses mobile-first indexing, a solid responsive setup built on media queries directly supports SEO and Core Web Vitals. Newer CSS adds container queries, which respond to a parent element's size rather than the viewport and are handy for reusable components, but media queries remain the backbone of page-level responsiveness.

06

Media queries at BeBranded

At BeBranded we build responsive layouts where breakpoints follow the content, not arbitrary device sizes, so a site stays clean and fast on every screen. It is part of how our design work keeps interfaces consistent from mobile to desktop.

FAQ

Questions about Media query.

Another question?

Write to us
What is a media query?
A media query is a CSS feature that applies styles only when the browsing environment matches a condition, most often the screen width. It is the core mechanism of responsive design.
What is the difference between min-width and max-width?
min-width applies styles from a given width and up (mobile-first), while max-width applies them up to a given width (desktop-first). Mobile-first with min-width is the common approach today.
What is a breakpoint?
A breakpoint is the screen width at which the layout changes. Teams usually define a few breakpoints (mobile, tablet, desktop) that follow the content rather than one per device.
What is mobile-first?
Mobile-first means writing base styles for small screens, then adding complexity with min-width media queries as the screen grows. It produces lighter CSS and matches mobile-first indexing.
Media query or container query?
A media query responds to the viewport (the whole screen), while a container query responds to the size of a parent element. Container queries are newer and useful for reusable components.
Does Webflow use media queries?
Yes. Webflow breakpoints are media queries under the hood. Styling at a given breakpoint in the Designer generates the matching media query in the exported CSS.

Related

Related terms, and where to go next.

BeBranded
UX/UI

Responsive design: complete guide for 2026

Responsive design: definition, technical principles, breakpoints, Flexbox, Grid, fluid typography, how Webflow handles it, mistakes and best practices.

Read the article
BeBranded
Development

Figma to Webflow: the complete workflow in 2026

Figma to Webflow: prepare your mockup, use the plugin, Client-First rebuild, best practices and mistakes to avoid. Step-by-step guide.

Read the article
BeBranded
Design

Design system: why and how to create one for your site

Design system: definition, components, how to build one in Figma, and how to translate it into Webflow with Client-First. Complete guide.

Read the article

Let’s talk

Tell us what you want to build.

Thirty minutes with the people who will work on your project. You leave with a clear view of the scope, the timeline and the next steps.

What happens next

  1. 1A 30-minute callWe listen to your goals, your constraints and your context.
  2. 2A clear scopeWe map what is worth doing first, and what it takes.
  3. 3A costed proposalYou decide, with no commitment and no sales pitch.