PRE / CODE CSS Style

I don’t know if anyone has ever found their PRE or CODE not wrapping, but I have and this little gem of code is the code I use to clean it up.  Here’s a link to my Snipplr version of the code.

pre {
white-space: pre-wrap; /* css-3 should we be so lucky... */
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+ */
_white-space: pre; /* IE only hack to re-specify in addition to word-wrap */
}

  1. limpieza says:

    good article, i will add my feeds.

  1. There are no trackbacks for this post yet.

Leave a Reply