Presently, the two main content <DIV>s on a SO page, #mainbar & #sidebar, have fixed widths hard coded into the CSS. This means that even if you make the browser very wide (say, streching over two monitors), the only parts of the page that get bigger are the empty white space on either edge. Meanwhile, if the page contains a code sample with long lines, it will have the most heinous sin of design: horizontal scrollbars.

This is even worse when trying to print, as the #sidebar is (properly) hidden, but its space is not reclaimed -- the right margin is just bigger, all while the code sample is now printed with the scroll bars.

A trivial change to the CSS, making the width of the #mainbar DIV a high percentage instead of a fixed amount, will allow us to have useful print-outs.

UPDATE: In response to the commentors who prefer narrow columns, my suggestion of completely compatible with that --- all you have to do is make your browser window narrower! (Windows are not required to be maximized)


4 Answers 4


I prefer a fixed page width for the following reason, which is explained so well by The Not So Short Introduction to LATEX (section 6.4 Page Layout).

WAIT! . . . before you launch into a “Let’s make that narrow page a bit wider” frenzy, take a few seconds to think. As with most things in LATEX, there is a good reason for the page layout to be as it is.

Sure, compared to your off-the-shelf MS Word page, it looks awfully narrow. But take a look at your favourite book (I mean a real printed book produced by a reputable publisher) and count the number of characters on a standard text line. You will find that there are no more than about 66 characters on each line. Now do the same on your LATEX page. You will find that there are also about 66 characters per line. Experience shows that the reading gets difficult as soon as there are more characters on a single line. This is because it is difficult for the eyes to move from the end of one line to the start of the next one. This is also why newspapers are typeset in multiple columns.

So if you increase the width of your body text, keep in mind that you are making life difficult for the readers of your paper.

Interestingly enough, it appears that Stack Overflow uses a page width of 110 characters, but I still find it much easier to read than any site that flows its text across the entire screen. Sure, this means that you need to scroll poorly-formatted code, but I think that's a small price to pay for more readable text overall.

If you really must print Stack Overflow articles, though, I suggest that you try StackPrinter (more information on Stack Apps).

  • A little bird told me that StackPrinter's author owns a couple of Ink refill companies. Aug 5, 2011 at 6:51
  • But, I'm NOT advocating wide columns. I'm advocating columns where the user can choose the size themselves. Done as I suggest, you can make them narrower just as easily as you could make them wider. Aug 11, 2011 at 11:22
  • 1
    Fair enough. Then consider my answer as a reason why I would probably never use such a feature, were it to be implemented. :) Aug 11, 2011 at 15:06

This would be a huge, huge change across all CSS (and the engine!) for 20+ designs.

It may happen at some point in the future, perhaps, but it won't be any time soon... we're kind of committed to the current fixed width for the indefinite future.

  • 10
    Even if you are changing to fluid layout, please give users an option to select fixed page layout. I prefer fixed page layout.
    – user162697
    Aug 4, 2011 at 20:19

I would say: Do it for the print view ... but only for code snippets, which otherwise would have scrollbars. The main text should not expand, for reasons already mentioned.

(By the way, I sometimes reformat code snippets to be narrow enough to not have a scrollbar.)


Here be a UserScript which collapses logo and menu.

Somehow my layout is getting rather jumpy with all the hacky scripts i apply to it...

Not the answer you're looking for? Browse other questions tagged .