CSS 3 · Responsive design

Change styles by screen width

Apply styles when the screen is at least 768px wide. Writing mobile styles first and adding queries for larger screens keeps CSS simple.

@media (min-width: 768px) {
  .sidebar { display: block; }
}

Official CSS 3 documentation

More responsive design commands

All responsive design commands · CSS 3 cheatsheet

Was this page helpful?