Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This is a bug in the Google Chrome browser (I'm running 14.0.803.0 dev), where code blocks wrap text, and it is very annoying:

annoying text wrap

Fortunately, I have a fix for you! Just add this to your CSS:

pre {
  word-wrap: normal;
share|improve this question
Eh, if that horizontal scrollbar shows in your code blocks you're doing something wrong. – Won't Jun 28 '11 at 14:33
@Won't, it seems half the ios questions with code in them are 100+ characters wide. NSIGuessThatIsTheDownside: OfReallyLongParameterizedArguments. – sarnold Jun 29 '11 at 2:53
@sarnold: dunno how they handle line breaks in that language. Most languages allow continuation on the next line via some token (newline, underscore, etc).... – Won't Jun 29 '11 at 13:29
@Won't, it's true that it could be written that way; but after a level or two of indentation, it's hard to fit both the name and parameter on the same line and still fit in 80 columns. I don't know how they read their code without going crazy. :) – sarnold Jun 29 '11 at 20:26
up vote 7 down vote accepted

This fix didn't have quite the expected effects. Backed out for now; overflowing links aren't half as bad (as they are a rare edge case, unlike codeblocks with horizontal scrollbars).

share|improve this answer
Can't you just add word-wrap: break-word; only on <a>s? – Felix Jun 28 '11 at 13:04
@Felix: That issue has nothing to do with links. – balpha Jun 28 '11 at 13:34
It seems to be back again... Chrome 32.0.1700.107 m. – TLama Feb 21 '14 at 16:17
@TLama Argh, my fault, side effect of this; will fix. Thanks for the heads-up. – balpha Feb 21 '14 at 16:31
@TLama Should be fixed in 3m48s. – balpha Feb 21 '14 at 16:48
@balpha, thanks! Will try tomorrow... – TLama Feb 21 '14 at 18:18

I can repro this on Mac OS X 10.6.6 and Chrome 12. Interestingly enough when you go to edit a question it works.

share|improve this answer
Yup, noticed that, too. It's probably because the preview is generated from JavaScript and not loaded in-page. – Felix Jun 28 '11 at 12:46

I can reproduce this on Chrome 12.0.742.100 (Windows 7).

share|improve this answer

You must log in to answer this question.

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