Why You Should Design Fixed-Width Websites
zmogo.com
zmogo.com
CNN, Yahoo, BBC, ebay, there are tons of major sites the use a fluid layout.
He is wrong that you have to deal with ANY size. You can assume the browser will be at least 800 pixels wide, you can assume it won't be more than about 1280, because people with larger screen typically shrink the browser.
It is harder yes, but not that hard to make a fluid site - especially if your designer actually makes websites and not flyers (as so many seem to).
And as a bonus you are a good deal of the way to a mobile version of the site if you make it fluid.
And a fluid site does not mean you need to have extremely long columns of text - max-width to the rescue (it can be made to work on all browsers, including IE6).
The article links to another that describes using fluid width to achieve similar results and probably works better on mobile devices. http://css-tricks.com/the-perfect-fluid-width-layout/
Supposedly 8-12 words per line is easiest for eyes to scan.
I've never seen -- but often wished for -- a fluid-width layout that automatically scales its text so that the average line in the main content has 8-12 words on it. (I often do this manually with the browser's text-zoom options.)
That's easy to do with a fixed width in units of ems:
min-width: 15em;
max-width: 35em;
For IE 6/7, conditionally add: width: 35em; width: expression(
document.body.clientWidth >
35 * parseInt(document.body.currentStyle.fontSize)
?
"35em"
:
(document.body.clientWidth <
15 * parseInt(document.body.currentStyle.fontSize)
?
"15em"
:
"auto"
)
;
(Hope the indenting is readable.)http://www.gunlaug.no/contents/wd_additions_14.html for some caveats and other notes, in particular you can not specify a font-size at all for the body element (if you do, then do the math yourself and not in the expression).
Almost, but not quite. That adjusts the width to match the font-size. I want the other way around: adjust the font-size to match the width. (If I make my browser window wider, the text should scale up.)
Currently, this would take Javascript -- either adaptively scaling the font until the desired words-per-line is reached, or calculating what font-size would mean the existing width, whatever it is, is ~35em.
With high-res screens and/or people with vision trouble, setting a particular font size is generally a bad idea.
I'm on a 24" iMac and my browser window is around 1200px, so I prefer not to have to cover two A4s side-to-side when reading.
1. Monitors are getting wider more than it is getting taller. 2. The latest browsers replaced "increase text size" with a zoom entire site feature instead.
Liquid layouts are useful if executed correctly and only if there has to be a lot of content to present.
(As it is, it was troubling to me that his examples of what he doesn't like are all big, profitable businesses while most of the examples he likes have yet to turn a profit.)