What Is The Best Screen Size To Design For in 2020?

27 Mar 2020

What Is The Best Screen Size To Design For in 2020?

With the help of CSS3 and mediaqueries you can change the layout of your website based on the detected screen size of the device (be it a computer screen, tablet, smartphone,…). But what are the current guidelines and best practices? Read on.

Devices & resolutions, common questions.

  • What browsers do people use?
  • On what kind of devices?
  • What is their screen resolution?
  • How much space is taken by the browser toolbars?
  • What does it mean for me as a web site developer?

The mediaqueries workflow.

First we will define our so called ‘breakpoints’ in our CSS file. These breakpoints target the screen resolution, and more specifically the width.

We could instruct our web site to act as follows:

  • If the end user’s screen is smaller than 480 pixels show the smartphone layout
  • If the screen is larger than 480 pixels but smaller than 1024 pixels show the tablet layout
  • If the screen is larger than 1024 show the regular desktop layout

Why target the width, not the height ?

  • We want our site to fit in the browser window without horizontal scrollbars
  • The height is relative (we are used to scrolling these days)
  • Vertical scrolling feels natural, horizontal scrolling does not

Can we ignore the height?

That depends on the content of your website. Very important information should be ‘above the fold’ which means: visible without scrolling. So it’s always good to know the available height on the most used devices, to avoid cutting off banners in the middle or putting that very important call-to-action button out of sight.Why not target the device?

I’m not saying you never should. Maybe in some particular cases you’d want to target a Samsung Galaxy or an iPhone 5. But in general you should keep your media queries as simple as possible. Everyday new devices are lauched and if you have dozen or more websites with very complex, device specific media queries you’ll have a hell of a job to keep everything up to date.

What can I change ?

Simply put: every CSS rule.
You can make a ‘normal web page’ look like a native app on smartphones if you’d wish.

  • Change font, colors, spacing,
  • Change images
  • Show / hide elements
  • Change column widths, layouts, …
  • The look of elements like buttons, form fields… and so much more

Current desktop screen resolutions in use (worldwide)

This table can be your guideline for your mediaqueries.

Screen widthSmallest screen heightIn use worldwide
1024 px768 px3%
1280 px800 px11%
1360 px768 px2%
1366 px768 px35%
1440 px900 px6%
1600 px900 px6%
1680 px1050 px3%
1920 px1080 px20%
2560 px and up1440 px1%

CSS Breakpoints: where & how many?

You don’t need to write mediaqueries for every possible screen resolution. To keep things simple you could target four groups:

  • smaller than or equal to 768 px (smartphones)
  • larger than 768 px (small devices, tablets)
  • larger than 992 px (medium devices)
  • larger than 1200px (large devices)

Those are the breakpoints as used by the very popular Twitter Bootstrap framework.

web design company in sialkot pakistan