David Cramer's Blog

Python, Django, and Scale.

Word-wrap Preformatted Text

I was searching the internet the other day for a solution to word-wrap preformatted text for pastethat.com. Low and behold, Google answers all, it just takes finding the right keywords. So, the solution:

1
2
3
4
5
white-space: pre-wrap;       /* CSS-3                  */
white-space: -moz-pre-wrap;  /* Mozilla, since 1999    */
white-space: -pre-wrap;      /* Opera 4-6              */
white-space: -o-pre-wrap;    /* Opera 7                */
word-wrap: break-word;       /* Internet Explorer 5.5+ */

Comments