News for hackers. Stuff that matters.
Re:Why You Should Design Fixed-Width Websites by russell on Wednesday February 18, 2009 @02:00PM (#486119)
I prefer fixed width text because it is a lot easier to read than stretched text.

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/

Re:Why You Should Design Fixed-Width Websites by anatoli on Wednesday February 18, 2009 @04:05PM (#486263)
Definitely agree with this. There is something to be said for using liquid layouts on a site like Amazon, where you have product listings next to each other — it's useful to have more space. But it's just plain wrong to have a liquid layout on a site like Wikipedia, makes it a chore to read the thing, or just any other text-based site (brand site, blog, etc.)

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.

Re:Why You Should Design Fixed-Width Websites by gojomo on Wednesday February 18, 2009 @02:42PM (#486165)
'Stretched' text? Do you simply mean extra-wide lines?

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.)

Re:Why You Should Design Fixed-Width Websites by russell on Wednesday February 18, 2009 @03:32PM (#486228)
stretched means extra-wide. I agree. I prefer reading NOT to be like watching a tennis match. The link I posted above seems to be such a fluid layout, but I haven't looked closely.
Re:Why You Should Design Fixed-Width Websites by Daniel_Newby on Wednesday February 18, 2009 @06:44PM (#486422)
"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."

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;
Re:Why You Should Design Fixed-Width Websites by ars on Wednesday February 18, 2009 @08:03PM (#486497)
Actually for IE6/7 do:

  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).

Re:Why You Should Design Fixed-Width Websites by gojomo on Wednesday February 18, 2009 @09:28PM (#486606)
That's easy to do with a fixed width in units of ems

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.

Re:Why You Should Design Fixed-Width Websites by Daniel_Newby on Wednesday February 18, 2009 @10:29PM (#486670)
Newegg does that with the menus and sidebar and it pisses me off. I find the text uncomfortably small, but when I fix it their Javascript jams it back to a small size.

With high-res screens and/or people with vision trouble, setting a particular font size is generally a bad idea.

Re:Why You Should Design Fixed-Width Websites by gojomo on Wednesday February 18, 2009 @11:16PM (#486720)
Good point; any such auto-sizing shouldn't override user zooms.