Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Responsive Design – Media Queries | CSS Course lesson | BraveProgrammer
  1. Courses
  2. /
  3. CSS Course

Lesson 23 of 50

·css

Responsive Design – Media Queries

10 mins

Course progress46%

What you'll learn

Keep these ideas in mind as you work through the lesson.

3 points
  • Use **mobile‑first** (`min-width`) strategy to keep the default stylesheet lightweight.
  • `prefers-color-scheme` and `prefers-reduced-motion` are user‑preference media features.
  • `@supports` helps you gracefully degrade when a property isn’t supported.

Media queries let you apply styles conditionally based on device features.

@media (min-width:768px) {
  .nav { display:flex; }
}

Common breakpoints:

  • @media (max-width: 599px) { … } – phones.
  • @media (min-width:600px) and (max-width:1199px) { … } – tablets.
  • @media (min-width:1200px) { … } – desktops.

Feature queries (@supports) detect CSS support.


Example: Mobile‑first navigation

.nav { display:none; }
@media (min-width:600px) {
  .nav { display:flex; }
}
Make it stickPractice what you've learned1 quiz · 6 practical tests · Optional activities from CSS CourseBrowse activities
Previous lessonKeyframe AnimationsContinue to lesson 24CSS Custom Properties (Variables)Back to CSS Course curriculum