CSSCSS · Lesson 11

Responsive Design

Mobile-first media queries, fluid type and container widths.

Video tutorialTrack course · freeCodeCamp
Speed
Next lesson
Watch 00:00 · 1 checkpoints Watch on YouTube More on this topic
Transcript & captions
3/3
csscss
/* mobile first: write the small screen styles, then enhance */
.card { padding: 16px }

@media (min-width: 768px) {
  .card { padding: 32px }
}

/* fluid typography with no breakpoints */
h1 { font-size: clamp(1.75rem, 5vw, 4rem) }
Try it yourself

Knowledge check

0/1 answered

What does mobile-first mean?