Go Back   DN Lodge Webmaster Forums > Web Design and Development > Web Design Discussion


Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-05-07, 06:56 PM
Jas's Avatar
Jas Jas is offline
DNL Junkie
 
Join Date: Oct 2005
Posts: 451
DNL Trust: (0)
Jas is a pretty decent person
Default FAQ on Screen Resolution

Frequently Asked Questions About Screen Resolution


The term resolution when used in this FAQ refers to the monitor size in pixels, e.g. 800x600. Technically “resolution” is a measurement of dots per length unit (e.g. 96dpi), but since “everyone” use the term “resolution” while meaning the former we’ll use it in this FAQ as well.

Can We Drop 800x600 Now?
No.

There still is and will be people who use 800x600 resolution, either because of hardware limitations or sight impairment, or personal preference. Even if everyone used a higher resolution that doesn’t mean that the browser viewport (the area in which your Web page renders) is as wide as the available screen area. The higher resolution people have, the less likely it is that they browse maximized. The browser window is basically more or less the same width regardless of the screen resolution, it’s just that the user has more available screen space for other things at the same time.

Some users also like to have a sidebar open while browsing (which can take up hundreds of pixels). Others might want to browse with two windows side by side, which means that with a resolution of 1280x960 each window can only be 640 pixels wide.

There are also some PDAs that have a 800x600 screen resolution, and use CSS “screen” media for Web pages.

What’s The Optimum Width You Can Use for 800x600 or 1024x768?
There is no consensus on a holy optimum as far as we can tell. Because of scrollbars, borders, snappers, etc., and because the browser window might not be completely maximized, you should probably subtract 20–50 pixels.

Which is The Most Common Screen Resolution?
As of early 2007, and according to the statistics we’ve seen, the most common screen resolution is 1024x768. But this information is not very useful; what is more interesting to know is the browser’s viewport width. Your Web page renders inside the viewport, not on the entire screen.

Different CSS for Different Resolutions with JavaScript?
It is possible to get the available width with JavaScript, apply different style sheets on load and on resize, but this is not a very good approach, both because it relies on script (which can be disabled or blocked by firewalls, etc.), doesn’t perform very well, and can be done much simpler and more performant with just CSS using a fluid/elastic hybrid layout. Changing the layout when the window is resized can also cause usability problems since the user can loose track.

If you want to have a different layout on handhelds then JavaScript is not an option, because most mobiles don't support JavaScript in the first place. You should use CSS media queries instead (e.g. media="handheld").

Fixed vs. Fluid?
Fixed width means that the width is specified with a measurement that doesn’t adapt to the browser width nor scale when text is resized (most often specified with px). Some designs “require” a fixed width to some extent, mostly because of heavy use of images, or are just simpler to implement using a fixed width. However, with wide browser windows the site becomes relatively narrow, and with narrow browser windows the page is too wide, resulting in a horizontal scrollbar. Additionally, since the user can resize the text, the line length becomes too short at large text sizes, and too long at small text sizes. If you have only done fixed width layouts in the past then we encourage you to take a closer look at the alternatives below.


Code:
 body { width:760px; }
Fluid width means that the width adapts to the browser width (either using the keyword auto or using percentages). With this type the user has control of the line length: simply resize the window. The typical argument against fluid width is that people who use wide browser windows may get too long line lengths. This might not necessarily be a disadvantage however; in some cases long line length results in faster reading, or is just preferred or even needed because of certain types of reading disabilities. People who prefer shorter line length can always make their windows narrower.

Code:
 body { width:95%; }
Using a fluid maximum width on images is very useful to make sure images don't break the layout or cause a horizontal scrollbar in a fluid (or elastic) layout. As the column gets narrower, the image will scale down, and the height of the image will stay proportional (given you don't use the height attribute in the markup; if you do, try height:auto in the style sheet).

Code:
 img { max-width:100%; }
Elastic width means that the width scales when the text is resized in the browser. This has the advantage that the line length doesn’t get too long, regardless of text size. The disadvantage is that it may become wider than the viewport, resulting in a horizontal scrollbar.

Code:
body { width:60em; }A hybrid
is a combination of the above, for instance using an elastic maximum width and otherwise fluid (referred to as fluid/elastic hybrid).

Code:
body { max-width:60em; width:95%; }
Different situations and audiences require different approaches. However, a fluid/elastic hybrid has the all the perceived advantages of both fluid and elastic while at the same time avoiding the disadvantages (except in the case where long line lengths are preferred), which is thus a good choice in most cases if the design allows for it. If not, you can still use a fluid/fixed hybrid, with fixed minimum/maximum width and fluid in between, which at least avoids the horizontal scrollbar in the range where it is fluid.

More specifically, fluid and elastic works well when the column is mostly text. If you e.g. have a fixed width sidebar (with mostly text), then as text is resized the line length quickly becomes too narrow (long words might not even fit, which might be a problem with languages that have many long words). If you have a column with only or mostly images (and you don't want to scale them), then fixed width might be best; otherwise you might crop the images or waste space if the column is wider than the images.

For IE6 you can either just fall back to fluid or fixed, or you can use expressions to simulate support for min-width or max-width. (Those properties are supported in IE7.)

Further Reading-------------

The above is from a post on Sitepoint.

Last edited by Brandon; 03-05-07 at 07:07 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Want to remove these ads? Register for your free account here.

  #2  
Old 03-06-07, 03:38 AM
Jewel's Avatar
Solitary Jewel
 
Join Date: Jul 2006
Location: Philippines
Posts: 393
DNL Trust: (0)
Send a message via ICQ to Jewel Send a message via AIM to Jewel Send a message via MSN to Jewel Send a message via Yahoo to Jewel Send a message via Skype™ to Jewel
Jewel is a pretty decent person
Default Re: FAQ on Screen Resolution

Nice post! Very informative and useful Keep up the good work
__________________
Jewel

"Our lives are not determined by what happens to us but by how we react to what happens, not by what life brings to us, but by the attitude we bring to life. A positive attitude causes a chain reaction of positive thoughts, events, and outcomes. It is a catalyst, a spark that creates extraordinary results."

Solitary Jewel | Web Development Philippines | DN Lodge
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
faq, resolution, screen


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blog doesn't fit into the screen modric Web Design Discussion 2 10-12-06 07:55 AM
Resolution? Yowser Web Design Discussion 8 03-28-06 01:43 AM
Your screen name Yowser General Discussion 6 02-22-06 04:36 PM
Php and website resolution? Mike Programming 3 11-15-05 09:40 PM
Screen Resolution.. livetoserve Internet Companies, Good vs Bad 6 06-04-05 01:54 PM


All times are GMT -5. The time now is 12:00 AM.



Copyright © 2005-2009 DNLodge.com.
vBulletin, © 2000-2009, Jelsoft Enterprises Limited.
SEO by vBSEO.
Advertising |  About Us |  Contact Us |  RSS |  Privacy Policy |  Back to Top