CSS Docs
CSS Media Queries
Learn how to create responsive designs using CSS Media Queries.
Media Queries help your website look good on all devices by applying different styles based on screen size and device properties.
🛠️ Breakpoints
Breakpoints define ranges for different screen sizes:
| Device | Width Range |
|---|---|
| Small | 0px - 600px |
| Medium | 601px - 1024px |
| Large | 1025px and above |
Example:
🧩 Using @media Rule
The @media rule applies styles only if conditions match.
🎯 Responsive Layouts with Flexbox and Grid
Combine Flexbox or Grid with media queries to build adaptive layouts:
📏 Media Features
Control styles based on the device's width and height.
Example:
📱 Mobile First Design Approach
Start with small device styles first, then add larger device styles.