2

I often browse JSE on my smartphone (Lumia 920), and although the mobile version works fine, some of the posts are impossible to read due to long URLs and code blocks expanding the viewport beyond the screen. Here's a screenshot from a random answer that causes this problem:

JSE on Windows Phone 8.1

Parts of the text is cut of, and without scroll bars it just can't be read. Zooming is not possible either.

I don't know if this problem is specific to Windows Phone (unable to test on Android/IOS at the moment), but it makes it a tiny bit harder to browse the site on a small screen.

2
0

This is normal, expected and intended behaviour as code is rendered inside <pre> tags, intended for representing pre-formatted content. So proper browser behaviour is display the content exactly as it is given, including the treatment of whitespace. Browsers simply aren't allowed to break or wrap those lines, they must render them exactly as authored.

http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-pre-element

That said, you should be able to simply scroll the code block with your finger, simply by dragging it, as the element has overflow: auto set on it in the css.

1
  • Yes, it's understandable for <pre> tags, but the block isn't scrollable, and I think the rest of the text still should be limited to the width of the screen. As you can see in the screenshot, the main text is also extended to the width of the code block.
    – johanpw
    Oct 22 '14 at 0:10

You must log in to answer this question.

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