What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

It appears that the popular thing to do - regardless of physical screen display size - is to have the content centered horizonally, and empty strips down both sides of the screen.

But it also appears that whatever monitor I use (17 inch, 22 inch plus whatever size this laptop is) I get a horizontal scroll bar on most of the code blocks in questions on this site; sometimes literally allowing a few characters of scrolling. You have to scroll just to check that there actually is some content out of view.

And when there's more text there - where there IS a point to scrolling...well, that's even worse. You scroll back and forth as you follow the code down the page. Very tedious.

If it's ok to develop code on monitors wide enough to display the code using pretty much the full width of the screen, then shouldn't there at least be an option to display code blocks using the full width too; perhaps centered so it takes as little space as possible, but as much as is required, and add scroll-bars only if even more width is required than what the current browser window allows?

share|improve this question
3  
Are you really expecting an answer to "why are people lazy?"? –  Oded Jan 20 '12 at 11:10
    
Is it laziness? What do the less-lazy do? Can you make the displayable window wider? –  Poldie Jan 20 '12 at 13:19
3  
The less-lazy think about others and format their code so it fits. –  Oded Jan 20 '12 at 13:20
    
It's not always laziness. I've edited posts that call methods with long names and multiple parameters from API classes that also have long names on the fourth or fifth level of indentation. Sometimes breaking things onto multiple lines can help, but other times it just makes a mess. @Oded The thing that bugs me is when you reach 82 characters and a scrollbar appears even though it only scrolls over two pixels and doesn't show anything new. –  Pops Jan 20 '12 at 17:34
    
@PopularDemand - What you are describing is the minority of reasons for code sections scrolling... –  Oded Jan 20 '12 at 17:52
    
I'm still not sure how you're supposed to format it. Or why. Why should you? You've got some code in your project which you want advice on - really you want to post it in as-is to reduce the change of introducing errors. If you're using the same monitor to code as you are to read Stack Overflow then as-is should be fine, shouldn't it? Here's an example completely at random - how would you handle this?: stackoverflow.com/questions/8947670/… –  Poldie Jan 20 '12 at 22:30
add comment

1 Answer

I would imagine that the folks over at StackApps (especially George Edison) could probably whip up a quick User Script that would do this for you.

Oh, wait. One already exists here: Click to expand code regions

share|improve this answer
add comment

You must log in to answer this question.

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