What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.
    
link to a post that is showing the issue? –  jjnguy Mar 20 '10 at 16:21
    
And a better description of the problem... What exactly am I looking for? –  tvanfosson Mar 20 '10 at 16:25
3  
+1, can reproduce. Chrome v4.1, Win7 –  jjnguy Mar 20 '10 at 16:34
3  
Reproduced on Chrome 4.1, Vista –  user27414 Mar 20 '10 at 17:18
2  
Reproduced - Chrome 4.1.249.1036 (41514) Win 7 x64 –  Sky Sanders Mar 20 '10 at 21:02
    
Reproduced: Chromium 4.0.226.0 (Ubuntu build 30050) and Chrome 5.0.307.11 beta (Ubuntu). I checked if it has something to do with the recently changed fontstack - I'm glad it has not. –  Ludwig Weinzierl Mar 20 '10 at 23:05
    
I was thinking if the way Chrom(e|ium) and Safari do it is really that bad. From my experiments with Chromium it seems that Copy & Paste still works properly, evern if the browser breaks the lines. Maybe the way Safari/Chrome display the code blocks is even superior? What do you think? –  Ludwig Weinzierl Mar 21 '10 at 9:31
1  
@Ludwig - I think it is not acceptable. Code examples are rendered unreadable. –  Sky Sanders Mar 21 '10 at 19:14
    
It's not localized to Google Chrome because it affects all Webkit browsers. –  Ludwig Weinzierl Mar 21 '10 at 22:57
    
@Ludwid - right you are. –  Sky Sanders Mar 21 '10 at 23:01
    
What's the status on this? It seems to be something that recently changed on Stackoverflow that triggered this. Is anyone working on it? It's a real pain. –  TechZen Mar 23 '10 at 21:53
    
I just noticed this recently. This should be dealt with soon as it makes reading the code more difficult. –  uɐɯsO uɐɥʇɐN Mar 26 '10 at 3:17

7 Answers 7

up vote 2 down vote accepted

I made the word-wrap: break-word; style apply to the child <p> element of .post-text rather than the whole thing.

share|improve this answer
    
admit it, you did it for the check and the rep. ;-p Thanks. –  Sky Sanders Mar 26 '10 at 4:45

Here is what it looks like in Chrome 5.0.335.0 dev on Ubuntu 9.04. (Updated to 5.0.356.2 dev with no change.)

screenshot of line wrapping

Since I hadn't updated Chrome in at least a few days (lazy, you know), I am fairly sure I have seen horizontal scrolling instead of wrapping with 5.0.335.0.

share|improve this answer
    
Yup. definitely call is broken. The code block rendered on every other browser scrolls, which requires an explicit css rule implying intent. Wrapping == broken. Thanks for the feedback r.e. chrome 5 - hasn't been pushed to windows yet. –  Sky Sanders Mar 20 '10 at 21:00
    
Seeing it here on 4.1.249.1036 on win7 –  Joel Coehoorn Mar 20 '10 at 23:40

Not sure if it is related but suddenly today I am getting similar text wrapping in code blocks. I came to Meta to check if anyone else had seen the problem.

I'm using Fluid Version 0.9.6. Fluid is a site specific browser generator based on Webkit/Safari. Ie used it to generate a SSB for StackOverflow and I have been using the resulting SSB for months now without issue. I am posting mostly Objective-C code.

I've been posting just as I always have i.e. same formatting, same text editor etc but today suddenly I can't get code to format. It wan't to wrap the code like blockquoted text.

For an example, see this post: http://stackoverflow.com/questions/2477603/iphone-how-to-embed-nsdata-in-xml-for-upload-to-server/2478052#2478052.

I gave up trying to post code in a couple of other post.

I'll do some checking with all my browsers to see if its general.

share|improve this answer
1  
"site specific browser generator" Am I the only one feeling reminded of discuss.joelonsoftware.com/default.asp?joel.3.219431 ? –  balpha Mar 20 '10 at 21:08

This seems to be a webkit related bug.

share|improve this answer

I think word-wrap:break-word; in the .post-text class in http://sstatic.net/mso/all.css?v=6534 is to blame.

  .post-text{
    width:660px;
    font-size:107%;
    margin-bottom:5px;
    margin-right:5px;
    line-height:130%;
    word-wrap:break-word;
  }
  .post-text hr{
    background-color:#ddd;
    color:#ddd;
  }
  .post-text a{
    color:#000;
    border-bottom:1px #000 dotted;
  }
  .post-text a:hover{
    color:#6C0000;
    border-bottom:1px #6C0000 dotted;
    text-decoration:none;
  }
  .post-text img{
    max-width:640px;
  }

I think the word-wrap:break-word; is not what we want there. Was it added recently?

WORKAROUND FOR CHROME:

  • Add the stylish extension to Chrome
  • Add a style with the following Code

    .post-text{word-wrap: normal; !important;}

Enable your new style.

And the scrollbars are back:-)

share|improve this answer
    
@Gnome: Yes, add the link above. –  Ludwig Weinzierl Mar 21 '10 at 0:16
    
1  
@Jeff: I agree for the comments, but what is your opinion on the code blocks? It seems that people would like to have their scroll bars back and if someone tries to break the layout deliberately you can't do much about it anyway. –  Ludwig Weinzierl Mar 21 '10 at 9:28
    
@Jeff: Maybe it is possible to set the word-wrap: normal; only for the codeblocks. (I have no time to check that right now.) –  Ludwig Weinzierl Mar 21 '10 at 9:34
    
@Ludwig - I gave the Stylish fix a try, not working for me ;-( What platform are you on? –  Sky Sanders Mar 22 '10 at 2:45
    
@Sky Sanders: Ubuntu 9.10, but that shouldn't matter. Make sure you have your new style enabled (I added another screenshot above). You can also try to leave the "Applies to" fields empty. –  Ludwig Weinzierl Mar 22 '10 at 4:44

Code block display on the iPhone has also suddenly changed... Anyone else seeing this?

There hasn't been any software update to cause this, so is it an intentional change?

share|improve this answer

Re: Jeff Atwood

Post Overflow

Well and good, but can we add word-wrap to the pre tags too? The following fixes the issue.

pre {
    font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
    margin-bottom:10px;
    overflow:auto;
    width:auto;
    padding:5px;
    background-color:#eee;
    width:650px!ie7;
    padding-bottom:20px!ie7;
    max-height:600px;

    word-wrap:normal;
}
share|improve this answer

You must log in to answer this question.

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