Responsive web design is based on screen resolution or screen size?
For mobile devices the resolution is actually big, only screen size is small. based on that:
- For websites design, do we target screen resolution (e.g 1920x1080)?
- And for mobile apps. do we target the screen size?
First, thank you all for the answers and precious guidelines, it sure helped!
Allow me to add my conclusion:
Practically, targeting mobile screen resolution is not a good UX, the resolution is too high for the small screen, fonts will be too small to read, icons will be too small to click, etc.
So, it's better to make the design based on the actual viewport size! This way it's based on what a user can see and feel.
To achieve that in real life, we should add a viewport width meta tag inside the
<head> of HTML documents:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
This tells the browser to render the page with a width equal to the screen width so it makes sure that the HTML page width equals the screen width in terms of pixels. Development then can be easily planned with media queries targeting different mobile viewport sizes (which are kinda close to each other), and will produce more visually clear elements.
Please correct me if I am wrong.
Based on my humble experience I suggest the below steps for better responsive website development:
1- use view-port meta (see top), it will also boost the ranking of the webpage in mobile search results according to google. http://googlewebmastercentral.blogspot.com/2015/04/faqs-april-21st-mobile-friendly.html
After testing, it appears that adding view-port meta alone will give your website grades in mobile testing tools https://developers.google.com/speed/pagespeed/insights/
2- you might want to consider applying mobile-first approach, it is always easier to go bigger than smaller (depends on how complex your website is)
3- Apply a hybrid responsive system, a mix between adaptive (fluid) and responsive (css media-queries), to accomplish this:
Use percentage for width and horizontal margins/ paddings. (vertical margins can have fixed pixel size if you like.. scrolling is not an issue anymore)
Use em for fonts, this way when you change the font size for the body (or html) in media-query all CSS elements will adapt to that size, using px will make it a nightmare because you have to go for each CSS class and change its font size.
Float div's to the left so they align correctly to available space (or right if your design require so).
4- Define the break points, use a responsive testing tool for that. I use firefox responsive design view, simply narrow the width until you reach the point where the website become faulty (e.g. 500px), that is a break point mark it down.
Apply the new CSS rules inside the media query for that break point (500px),
5- remember to preserve website quality and clarity! if elements becomes unclear and too close to each other, then expand elements width to occupy container width and make them stack vertically,
and remember to give a new font-size for the body so all sub-elements inherit a bigger font and become more readable.
6- Repeat the responsive test and define your second break point, Most likely you will not get many break points because we are using fluid design here and that is where using percentage's will payback!
I worked on a big website with heavy design elements before and it only required 2 media queries :)
Hope that will help
Responsive design is based on neither screen resolution nor screen size. Instead, responsive design is based on the content and how it's made which allows it to fit all sizes and resolutions.
The way you're thinking about responsive design is wrong. I assume you're coming from a more conventional print design background, yes? Designing for the web is much more freeing. Responsive websites don't often have the same, conventional breakpoints or specific sizes/resolutions that they are made for because the web allows for more than that - it allows for all screen sizes to be reached. A such, you can design using whatever sizes is right for what you're designing so long as they are reasonable.
With that being said, the best practice is to design in a mobile-first way, which really should be named mobile-most-important. This forces you to focus on the content that is most important and possible and then allows you do add more for bigger screens instead of forcing you to start with more on large screens then remove things when designing for smaller ones. You can read more about this in my responsive design primer.
But we also have to design in ways that allow for responsivity. The best practice of which is a live example, whether in prototype form or in some wireframing program, not a static document like a PSD. When it comes to the developer side, we should be using responsive units and structuring our code in a way that makes sense.
With that being said, you should put things in terms of pixels, meaning resolution, not screen size.