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

I was looking at an old post and when I expand the comments they spread way over everything on the right. Has anyone else experienced this problem?

I see it in Firefox 4.01, Chrome 11.0.696.68, and Opera 11.10 (on Mac).

share|improve this question
    
What browser? It looks fine on IE8. – mmyers May 16 '11 at 15:52
2  
Certainly looks like a problem, I see it too (Firefox 3.6, Mac) – NickC May 16 '11 at 15:52
    
@Renesis , @mmyers am I posting this to the right place ? – mcgrailm May 16 '11 at 15:54
    
This is a know bug. Jeff has stated many times that it is difficult to limit the width of comments because they have variable width. – jjnguy May 16 '11 at 16:03
    
@jjnguy but it wraps just fine until i open the additional comments – mcgrailm May 16 '11 at 16:15
    
@mcg, that's because the comment that is causing the problem is hidden until you expand them. – jjnguy May 16 '11 at 16:19
    
@jjnguy right but that shouldn't matter see my answer – mcgrailm May 16 '11 at 16:21
up vote 18 down vote accepted

Yay! More unicode fun!

So far we were inserting soft-hyphens ­ into long comment lines without whitespace to force line-breaks; but it seems that not all browsers can be convinced to make this work in all cases.

We can't use the zero-width space ​ because it doesn't work in IE; we can't use the zero-width non-joiner ‌ because that doesn't work in all browser as well.

But alas: It seems the using both actually works everywhere. So, from now on, our Stack Exchange™ WhiteSpace EnforcementOfficer™ is

‌​

Next build, as usual.

share|improve this answer
    
ok I'm sure this is good logic to this but why not use what I suggested..please keep in mind that I am not a css expert – mcgrailm May 16 '11 at 17:30
1  
@mcgrailm See Jeff's answer here as to why CSS changes don't help in comments. – balpha May 16 '11 at 17:39
    
still don't get it, seems the answer is because hes not willing to make it fixed with or max-width seems like it's not a good reason but its not my site LOL – mcgrailm May 16 '11 at 17:50
    
Did you consult with badp or are you putting him out of business? (; – Rebecca Chernoff May 16 '11 at 20:25
1  
@RebeccaChernoff: He's the Deputy. Which is good for him, because the Deputy is still alive. – balpha May 16 '11 at 20:45
    
Favoriting this answer for my own use in the future. Also, such a good answer maybe this should be migrated to SO; then again, it's probably a duplicate there :) – NickC May 16 '11 at 23:27
1  
I guess you'll see it one day, but just in case you would not: what about inserting <span style="display: inline-block"></span> instead? – Arjan Mar 9 '13 at 10:31
    
Instead of the often proposed word-wrap: break-word, there's also word-break: break-all, which works nicely in all my browsers, but apparently not in Opera... :-( – Arjan Mar 9 '13 at 19:46
    
(@NickC, late response: if that future has come for you already, then maybe some other non-Unicode trickery is better, if your visitors are copying text. See my comments above. And of course all trickery might make it hard for search engines to index correctly.) – Arjan Nov 23 '13 at 23:52

I think this could be fixed with

.comment-text{
    max-width:50px;
}

no ?

edit

example image

it doesn't look like overflow is hidden here

share|improve this answer
    
So, you propose overflow: hidden? – jjnguy May 16 '11 at 16:23
    
@jjnguy see edit – mcgrailm May 16 '11 at 16:36
    
why the down vote ? is this not a logical answer ? – mcgrailm May 16 '11 at 18:09
    
dunno, it wasn't from me. – jjnguy May 16 '11 at 18:13

You must log in to answer this question.

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