Beholder's

Knowledge

Web Design

Web Design - CSS

::: <PRE> Word Wrap

The Code:

pre {
    /* Browser specific (not valid) styles to make preformatted text wrap */
    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+ */
    }

Note: the top comment is wrapped

:::


Back to Web Design Resources