8

Stack Overflow question https://stackoverflow.com/a/23033650 (deleted now, only visible to members with 10K+ rep) is covering all the answer options like:

-Enter image description here

See:

Enter image description here

It will be corrected. I put all the data inside the answer in a code block.

Enter image description here

But why is it overflowing when the code block is not used?

2
  • 5
    The question is more as to why a code block constrains the text; most likely because it uses a scrolling block instead. Commented Apr 12, 2014 at 18:53
  • 1
    Interesting...I see i.sstatic.net/o1Aip.png. Chrome on Ubuntu 12.04 Commented May 4, 2014 at 23:24

1 Answer 1

6

Martijn Pieters identified the difference in his comment:

The question is more as to why a code block constrains the text; most likely because it uses a scrolling block instead.

Code blocks have a maximum width and height, to prevent long lines and excessively-long code snippets from taking over the page. Content which exceeds these dimensions is hidden (with scrolling allowed to reveal it) via this rule:

pre
{
 ...
 overflow: auto;
 ...
}

This concerns only the difference in how they overflow; the very different rendering is likely a browser bug.

1
  • I'd imagine the different rendering is more likely to be a difference between the fonts used, since it's sans-serif in the first case and monospace in the second. Using a blockquote might make it render the same.
    – Dave
    Commented May 11, 2014 at 11:44

You must log in to answer this question.

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