WordPress.org

Ready to get started?Download WordPress

Forums

Would like to wrap the text inside of the pre tag (4 posts)

  1. madcowz
    Member
    Posted 6 years ago #

    Hi,

    I am testing WordPress and the CodeHighlighter plugin but finding that text inside the pre tag isn't wrapping correctly.

    You can see what is going on at: http://xyserv.letterpart.com/ and the post in question is: titled: "Using Perl to send mail via SMTP"

    I'm sure this is a simple css edit but I am having a bit of a male blonde moment.

    thanks for your help.

  2. Eric Amundson
    Volunteer Moderator
    Posted 6 years ago #

    Try this:

    pre {
     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+ */
    }

    from:

    http://users.tkk.fi/~tkarvine/pre-wrap-css3-mozilla-opera-ie.html

  3. madcowz
    Member
    Posted 6 years ago #

    Superb, that works a treat.

    And have book marked that link as well.

    thanks,

    /mad

  4. Eric Amundson
    Volunteer Moderator
    Posted 6 years ago #

    :) You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Topic