Nexus

CSS Media Query Generator

Width

S

320px

Small smartphones

(iPhone SE, Galaxy S5)

M

375px

Medium smartphones

(iPhone 6, 7, 8, X, 11 Pro)

L

414px

Large smartphones

(iPhone 6/7/8 Plus, XR, 11)

S

600px

Small tablets

(Nexus 7)

M

768px

Portrait tablets

(iPad, iPad Mini)

L

800px

Android tablets

S

1024px

Small laptops

(iPad, iPad Mini)

M

1280px

Medium laptops

(Small desktop monitors)

L

1440px

Large laptops

(High-resolution monitors)

1600

1600px

Large desktop monitors

(27 inches)

FHD

1920px

Full HD monitors

(24 inches and above)

QHD

2560px

QHD monitors

4K

3840px

4K monitors

Height

S

480px

Small screens

600px

Tablets

S

800px

Small laptops

FHD

1080px

Full HD screens

1200

1200px

Large screens

QHD

1440px

QHD monitors

4K

2160px

4K monitors

Ratio

4 : 3

16 : 9

16 : 10

3 : 2

Resolution

96dpi (1x)

Standard resolution

144dpi (1.5x)

Medium resolution

192dpi (2x)

Retina resolution

288dpi (3x)

High resolution

384dpi (4x)

Ultra high resolution

Frequently Used

Orientation

Portrait

Landscape

Prefers Color Scheme

Light

Dark

Scan

Progressive

Interlace

Grid

Bitmap

Grid

Understanding Media Query Syntax

The @media rule in CSS allows you to apply styles based on specific conditions, such as screen width, height, resolution, or aspect ratio. This feature is essential for creating responsive designs that adapt seamlessly across devices. The basic syntax is straightforward:

@media (condition) {
  /* CSS rules here */
}

Here's a breakdown of commonly used media query features:

By leveraging these features, you can craft responsive designs that provide an optimal user experience, regardless of the device or screen size.

Examples of Media Query Usage

To demonstrate how these features come together, here are some examples:

/* Minimum width */
@media (min-width: 768px) {
  body {
    background-color: lightblue;
  }
}

/* Landscape orientation */
@media (orientation: landscape) {
  body {
    background-color: lightgreen;
  }
}

/* High-resolution screens */
@media (min-resolution: 2dppx) {
  img {
    filter: contrast(120%);
  }
}

These examples highlight the flexibility and precision of media queries. You can combine multiple conditions or target specific scenarios to ensure your designs are versatile and future-proof.

Versatile Media Query Creations

Our media query generator allows you to easily create responsive CSS rules for a wide range of conditions. With intuitive controls and the ability to stack multiple queries, you can tailor your styles to any scenario. Whether you're targeting width, height, or resolution, our tool empowers you to fine-tune your designs for maximum adaptability.

Why Choose Our Generator?

Our site stands out by offering five comprehensive tabs: Width, Height, Ratio, Resolution, and Frequently. This categorization simplifies the process of finding the media queries you need. You can select and combine multiple queries effortlessly, allowing for precise control over your responsive designs. Whether you're a beginner or an experienced developer, our generator provides an easy-to-use interface for crafting sophisticated and efficient media queries. Start building better, more adaptive designs today!