views:

369

answers:

5

Back in the day, 800 x 600 was the screen resolution to design for - and maybe 640 x 480. Then along came 1024 x 768, etc, etc, etc.

But then it gets worse: now we have not only different resolutions but also different aspect ratios.

What strategies do people use to accommodate today's ever-expanding range of screen sizes and aspect ratios?

(BTW - I was only thinking about laptop / desktop hardware, but of course there's smart-phones and tablets to consider too.)

+1  A: 

This is a common but complex question, which unfortunately does not have a single best solution. It all depends on the kind of content that you have. You can use a fluid layout, or design your site differently for different resolutions (see http://www.maxdesign.com.au/articles/resolution/). For an example of a fluid design, check this out - http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign

tathagata
+1 Thanks Tathagata. I was expecting much more dialog than this - it's not like this is an obscure problem :)
Adrian K
Adrian, looks like this might not be the best forum to discuss design problems :) but then I don't know if there are any better options. Maybe Jeff/Joel should create a separate forum for front-end designers/programmers.
tathagata
I'm aware of fluid approach - and I'm a fan :) But is it really the best strategy? I just get the feeling that once you start talking about big screens / multiple screens / wide screens simply being fluid isn't enough.
Adrian K
Adrian, what you say it true. Actually, a lot also depends on the context of your website. It might be better to create separate design for different resolutions at least from a usability point of view (in addition of course to aesthetic improvements :)).
tathagata
+9  A: 

Watch out for high DPI settings

I think one of the most undiscussed issues facing front-end web development today is testing on high DPI systems. Everyone has learned to test and test and test on different browsers but designers/developers have not caught on to testing on different DPI settings.

High (or even low, for that matter) DPI settings break designs when fonts are scaled but images are not (which can happen), can cause images to look fuzzy/blurry, and absolutely positioned objects may not appear in the desired location (which would be devastating for CSS menus.) If nothing else, test your images at high DPI and re-render them as necessary.

This has never really been an issue until recently with the release of Windows 7 and people buying computers with high resolution monitors. First off, Windows 7 uses 96DPI as default (which is different from the rest of the computing world that has been using 72DPI as the standard. Moreover, Windows 7 will automatically adjust DPI settings and I have seen people with DPI of 150% of normal (96 DPI in Windows).

Here's a great link discussing this issue in more details: http://webkit.org/blog/55/high-dpi-web-sites/

A great cross-browser website designed with web standards is the goal but don't forget about DPI testing.

Alison
Interesting! Do you have any strategies for dealing with this issue? I assume testing is largely a manual process of simply eyeballing it?
Adrian K
Right now, knowledge is the best weapon that I can think of. Search out as much as you can regarding web design, CSS, and DPI. I updated my answer with a good link discussing the issue.
Alison
ah, right... I guess that would explain why I'd unconsciously noticed that my Win7 machine rendered fonts much tighter than other Win boxes. Thanks for pointing that out!
Jonathan Day
+4  A: 

I know this would be a somewhat controversial opinion, but I'd say it anyway: Don't

Don't design for multiple screen sizes or aspect ratios. There are of course a few exceptions: Heavy web applications like webmail clients can definitely do with more screen real estate, and are probably flexible enough to accommodate a large range of screen sizes anyway. Mobile versions of said website, with a more flexible design to accommodate the incredible spectrum of mobile screen sizes can help too for sites with high mobile volumes. However, if you stick to the so called 'desktop web', then I think we can say that 95% of the time there are more important things to care about than screen sizes, resolution and aspect ratio.

First off, lets tackle the easy one. I don't really understand why you would care so much for aspect ratio - it isn't like we care that much for the 'below the fold' nonsense anymore, do we? The web is a vertical medium - scrolling will always have a place in websites. Having everything above the magical 600px line is just stupid.

Next, screen resolution/size: Again, I find it difficult to defend.

Users with large screens do not usually maximize their browser windows, because they find that most website do not take advantage of them. While the web adjust to the user, the user also adjust to the web. Although you could argue that this is a chicken and egg problem, the fact remains that website are usually designed for the lowest common denominator. I'm not defending this position, but rather, pointing it out as the current prevailing trend in the industry.

There are certain things that simply won't work with resolution that are too high or too low. There is, for example, a small range of widths that allow people to read comfortably on screen. Any longer and the amount of movement for the eye to the next line would be annoying. Too low and the text would appear cramped. The fact that the web was designed to be resolution neutral means that paradoxically not many provisions has been made for those who wish to build fluid layouts. min-height and max-height would help, of course, but the wider the range, the more difficulties you will face. Things like orphaned elements, displaced images, backgrounds that run out, etc. are unavoidable for truly flexible sites built with today's technology.

So my opinion is that the simplest method for dealing with multiple resolutions is to ignore it altogether - with today's technology there are not many options anyway - and design for the lowest common denominator.

Yi Jiang
I whole-heartedly agree. Well said.
Litso
"min-height and max-height would help, of course" - I certainly agree with that!
Adrian K
"a small range of widths that allow people to read comfortably on screen" this is one of the things which fuelled my question; if we limit the size of (say) content areas doesn't that expose new options for making use of wider screens which are more prevalent today? - Why make users scroll down when there is spare space to the side? Just something I wonder about :)
Adrian K
@Adrian: Because there is no obvious ways to use them. Sure we can have many more sidebars, but the main content must always maintain the same width. CSS3 columns may help, but forcing the reader to scan all the way back up to the top of the article would be even worse than just letting him scan downwards. If you want navigational elements to be always accessible you can always `position: fix` them.
Yi Jiang
+3  A: 

Well, trying to keep the answer not-too-long, this is what I do.

(A) Always start from the most likely used ratio/resolution

If your average joe is going to be on a modern laptop or a desktop machine he likely has AT LEAST 1024x768 (refs: w3schools elykinnovation), that gives you roughly a usable 960px width (you might want to check the 960grid system).

(B) Layout: fluid or not?

If your website could benefit from a larger width, pick a fluid design starting from this resolution. Be careful that the human eye does not like to read text over long lines, so do not abuse of fluid design; often sticking to 960px with large margins is acceptable. You might want to add (javascript) some additional side-menus if you really have a lot more space. But design your website to work without JS as much as possible.

(C) Smaller resolutions

Finally check that with lower resolutions things are still acceptable.

(D) Other devices, ratios and stuff

There are not many options for different ratios; it often means you are running on a mobile, ipad, AAA or similar device.

My advise is to ... design for those devices specifically.

While writing your HTML keep in mind what you are going to need and remember to do HTML by semantic and not for design. Use properly HTML5 semantic tags if you can. Avoid < bold > or similar tags, and properly use tags and classes that you are going to style with CSS instead.

Then produce a separate CSS file for your mobile devices.

There are several ways to serve a different CSS depending on the client; you can do it:

  1. server side, checking the browser in the HTTP heading coming from the client, either with your web server or your dynamic scripting environment - be it python/django, php, or whatever else
  2. javascript (you can easily get the window size)
  3. html - in particular with some specific devices such as iphone

You can easily produce a generic design for small (eg. mobile) devices by following some simple rules: 1. fluid layout capable of fitting in very small widths 2. compact header/footers not too waste too much space 3. few, clear contents per 'page' 4. avoid :over effects as they won't work on touch devices!!!

If you want to go further, you have to check individual devices customizations; an example is the iphone viewport, see the apple ref library.

This is just to get you started. Experience and specific needs will drive the rest!

Stefano
Nice answer, thanks for the references.
Adrian K
you'r welcome! don't hesitate asking more precise questions should you need... it's hard to make a broad answer without writing several pages
Stefano
+2  A: 

Your site can't work perfectly for every display. Even if you had enough hours in the day (or should I say year/decade) to design for every possible display, you'd have to do it over every time a new device comes out.

In my development, I still religiously try to avoid horizontal scrolling, and that isn't too hard with floating divs / variable-width divs. But beyond that, we really are at the "there's an app for that" cross-roads, where you need a specially designed display for specific devices.

One strategy I use is to reduce dependence on a single display -- a customer probably doesn't need to see your entire web page to do what they came to do. You can parse-out functionality to smaller/simpler web pages that scale better on differently-sized devices.

At work, I have a little more "power", as it were -- I can develop internal web apps that are "designed to run on...some specific browser, some specific display setting, etc. -- use other configurations at your own risk". This, only after getting the managers to agree that spending an extra week in development (and even more in upgrades / future maintenance) just to placate that one vegetarian at the other end of campus who refuses to use IE really isn't worth the cost. In that case, we need another Timmy, not a more flexible web app that can look good on his favorite non-IE browser.

dave
"Your site can't work perfectly for every display..." - I completely agree - so your strategy (like a lot of us, I guess) is to pick a sweet spot and design for that - whilst trying not to do anything that will be really bad for others (where practically possible).
Adrian K