tags:

views:

310

answers:

3
A: 

Have you tried setting a width or min-width for your pre block? Or perhaps trying a different position or display attribute for the block. Could try floating it or display: table. Just some ideas.

William
Yeah I did try hard-coding a width, which worked as a sort of hack, but it had the side effect of causing my font styles in the `<pre/>` tags to get messed up; I would get a weird mix of 11 and 12 pt fonts, where they should all be 11. Very bizarre. and that screws up the fonts for some reason.
Caffeine Coma
A: 

I'm not sure if pre accepts the overflow attribute but I'd try setting that, if not, wrap it in a div and do the background there, will give you slightly more freedom in your formatting options. (for instance if you wanted to have several blocks of code with "captions" underneath each part)

Sneakyness
+1  A: 
Nelson
My viewport is set as follows: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>Glad to hear that it was reproducable.
Caffeine Coma