11

I have a screen shot of my code snippet in chrome:

enter image description here

and in firefox:

enter image description here

My question is, how do I make the same effect in firefox as it was in chrome? the code snippet part is inside a pre tag. thanks a lot for any help! :)

Emkey
  • 5,346
  • 8
  • 38
  • 55

2 Answers2

22

Cross browser wrapping:

pre
{
    white-space: pre-wrap; /* CSS3 */
    white-space: -moz-pre-wrap; /* Mozilla, post millennium */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}

JSFiddle

Evan Mulawski
  • 54,662
  • 15
  • 117
  • 144
4

Try

 pre {
       white-space:normal;
       word-wrap: break-word;
     }
Ahmad Alfy
  • 13,107
  • 6
  • 65
  • 99