Creating a responsive website is really about ensuring that your design looks fantastic on any device, mobile, tablet, laptop, desktop, or whatever. First knowledge of common screen sizes and how to maximize them will help one to reach this.

This post addresses CSS methodologies and suggestions of mobile-first approaches along with the most often used screen sizes for responsive web design.

Why should screen sizes be given some care by web designers?

Users of your website might vary in device from small cellphones to ultra-wide displays. Responsive web design guarantees that your website suits many screen sizes, thereby offering a user-friendly experience on various devices.

For a smartphone, for instance, the measurements of the mobile website are much different from those of a desktop screen. Knowing these variations benefits you:

  • Boost user experiences.
  • improve accessibility.
  • Improve the search engine performance of your website.

Two Years Worth of Device Use Insight

Recent figures from sites such as StatCounter reveal:

Mobile devices account for 63.06% of all internet traffic in 2024.

Desktop usage: Although declining, desktop traffic still shows great relevance for professional usage at 35.08%.

Just 1.86% of total traffic came via tablets, which also indicates a small portion of use.

These trends underline the reasons for the great relevance of mobile-first design. Given that mobile devices make up 60% of traffic, the small-screen experience has to be flawless. Still, desktops are really significant, especially for business users; consequently, responsiveness across all devices is rather crucial. Giving smaller screens top attention ensures that most users will still be able to access your website.

Typical responsive web design screen sizes

Here is a list of commonly used screen sizes among different devices:

While understanding these screen sizes is vital, approach your design process sensibly and equally in importance. Next is deciding whether to prioritize larger screens (desktop-first) or smaller displays first (mobile-first). 

Let's look at why the best practice—viewed as a mobile-first strategy mixed with the @media (min-width) approach—is regarded as such.

1. Dimensions of the mobile screen

  • Small Phones: 320x568px (earlier Android versions, iPhone SE)
  • Medium Phones: 375x667px, e.g., iPhone 8 or Galaxy S8.
  • Large Phones: 414x896px, e.g., iPhone 11 or Galaxy S10.

2. Tablets Screen Dimensions

  • Tiny tablet: 600x900px.
  • Medium Tablets: 768x1024px, e.g., iPad Mini or Galaxy Tab.
  • Big tablets, 800x1280px.

3. Laptop and Desktop Screen Sizes

  • Small Laptops: 1024x768px.
  • Standard Laptops: 1366x768px
  • Large Desktops: 19201080px and beyond—that is, 4K displays.

Why @media (min-width) and Mobile-First Are Better?

focusing on design for smaller displays first before scaling up to bigger ones, the mobile-first approach is This issue occurs when many developers know desktop-first approaches but may not know why mobile-first has become accepted as a solid practice for web design.

Using a mobile-first strategy ensures that your design scaled up for bigger devices first and is optimized for smaller displays. This strategy simplifies progressive enhancement and provides higher performance.

Starting with the basic styles for mobile and adding enhancements for bigger displays, using @media (min-width) instead of @media (max-width) aligns with mobile-first design:

/* Mobile first */
.container {
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 100vh;
  color: black;
}

/* Tablet */
@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
    background-color: green;
    color: white;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
    background-color: red;
  }
}

Since you are developing upward instead of altering styles for lower devices, this helps maintainability of your CSS and makes it simpler to handle.

responsive- design css


CSS for Responsive Web Design: Approaches

This part walks you through exactly how to effectively implement a mobile-first strategy. To design a really responsive website, use these guidelines:

Let's explore step by step how to make your website responsive for every screen size.

1. Set breakpoints with media queries.

Specific screen sizes known as breakpoints let your design change to suit various devices. Here is one way to manage many breakpoints:

/* Default (mobile-first) */
.container {
  padding: 0.625rem; /* Use rem for consistent spacing */
  font-size: 1rem; /* Use rem for consistent scalability */
}

/* Tablet */
@media (min-width: 768px) {
  .container {
    padding: 1.25rem; /* Adjust spacing for medium screens */
    font-size: 1.125rem; /* Scales text size for medium screens */
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    padding: 2.5rem; /* Larger spacing for larger screens */
    font-size: 1.25rem; /* Scales text size for large screens using rem */
  }
}

Each breakpoint progressively enhances the design for larger screens while retaining the base styles for mobile.

2. Use Flexible Layouts with Grid or Flexbox

Instead of fixed units, use rem, em, or percentages for flexible and scalable layouts. Grid or Flexbox makes creating responsive designs efficient and manageable.

Example Using Grid Layout:

/* Default mobile-first styles */
.container {
  display: grid; /* Enables CSS Grid Layout */
  grid-template-columns: 1fr; /* Single column for small screens */
  gap: 0.625rem; /* Adds consistent spacing */
}

/* Tablet breakpoint */
@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(2, 1fr); /* Two columns for medium screens */
    gap: 1rem; /* Adjust spacing */
  }
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
  .container {
    grid-template-columns: repeat(4, 1fr); /* Four columns for larger screens */
    gap: 1.5rem; /* Further adjusts spacing */
  }
}

Explanation:

  1. Default Styles (Mobile First): The container starts with a single-column grid layout, ensuring readability on smaller screens.
  2. Tablet Breakpoint: The layout changes to two columns for devices with a width of 768px or more.
  3. Desktop Breakpoint: The grid expands to four columns on screens 1024px or wider, maximizing the use of space.

3. Leverage TailwindCSS for Rapid Prototyping

TailwindCSS simplifies responsive design with utility classes that dynamically adapt based on breakpoints. Here’s a comparison to understand its power:

Without TailwindCSS:

<style>
  .heading {
    font-size: 1rem; /* Default font size for small screens */
    padding: 1rem; /* Default padding */
  }

  @media (min-width: 768px) {
    .heading {
      font-size: 1.25rem; /* Larger font size for medium screens */
      padding: 2rem; /* Adjusted padding */
    }
  }

  @media (min-width: 1024px) {
    .heading {
      font-size: 1.5rem; /* Largest font size for large screens */
      padding: 3rem; /* Increased padding */
    }
  }
</style>
<div class="heading">Responsive Heading</div>

With TailwindCSS:

<div class="p-4 md:p-8 lg:p-16 text-lg md:text-xl lg:text-2xl">Responsive Heading</div>

Why TailwindCSS is better

Short Code: Reduces the need of extensive CSS rules.

Utility Classes: Use HTML directly to quickly prototype styles.

Built-in breaking points: Classes like lg: and md: manage responsiveness without specialized media searches.

With TailwindCSS:

p-4 provides minor screen padding.

For medium screens (min-width: 768px), Md:p-8 pads.

lg:p-16 pads big displays (min-width: 1024px).

This method simplifies responsive design, eliminates the need for hand media searches, and speeds development and efficiency of operations.

4. Test Between Devices

To make sure your website performs and appears perfectly across devices:

For screen simulations, use Chrome DevTools among browser tools.

Verify layout behavior and touch interactions on actual devices.

For comprehensive cross-device testing, think about using BrowserStack, ResponsiveViewer.

Need Help with Your Next Project?

Have questions about responsive web design or need an expert to build your project? I’d love to help. Let’s collaborate to create something amazing!

Contact Me

FAQ

What are the most common screen sizes for websites?

Common screen sizes include:

  • 375px x 667px for mobile
  • 768px x 1024px for tablets
  • 1366px x 768px for laptops

For a full breakdown, refer back to the "Common Screen Sizes for Responsive Web Design" section.

How do I make a website responsive?

Use CSS media queries, flexible layouts, and frameworks like TailwindCSS to ensure your website adapts to different screen sizes. For more detailed steps, see "How to Use CSS for Responsive Web Design."

What’s the difference between screen size and resolution?

Screen size refers to the physical dimensions of the display, while resolution refers to the number of pixels the screen can display.