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

How can I add a scrollbar to a code block when the code has long lines? For an example, look at the code block of this question.

share|improve this question
7  
A scrollbar is added automatically when the length of any line in the code block exceeds the width of the block. One was added in this answer of yours, for instance. –  Michael Petrotta Nov 9 '12 at 7:08
3  
Except on mobile, which wraps long lines. –  Arjan Nov 9 '12 at 7:21
    
@MichaelPetrotta: Oh i got it now. But when I created a block using ">" it doesn't add a scrollbar. Am I correct? –  prageeth Nov 9 '12 at 7:52
2  
That is not a code block. That is a blockquote. Those are different things. –  Bart Nov 9 '12 at 8:01
1  
see: How do I format my code blocks? "What do I need to do so that my code shows up properly..." –  gnat Nov 9 '12 at 8:59
1  
@gnat : Thanks, your comment is really helpful. –  prageeth Nov 9 '12 at 10:14

1 Answer 1

up vote 1 down vote accepted

As the commenters on your question said, this happens automatically. There are however some scripts available on StackApps which improve the usability of the code blocks in general:

share|improve this answer

You must log in to answer this question.

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