Return to Snippet

Revision: 40163
at January 27, 2011 04:05 by paul66

Initial Code
pre {
padding: 15px;
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */

Initial URL

Initial Description
This snippet simply makes the text wrap when it reaches the walls of its container, in this case, the pre tag, whilst still preserving line breaks and white space cross browser.

Initial Title
Formatting quoted code

Initial Tags
css, text

Initial Language