Ever used a <PRE> in a limited width div container? You will notice that the line gets cut off almost as if wordwrap was not enabled.

To correct this you can add the following code into your CSS file.
[code lang=”css”]
white-space: pre-wrap; /* CSS2.1 compliant */
white-space: -moz-pre-wrap; /* Mozilla-based browsers */
white-space: o-pre-wrap; /* Opera 7+ */
This code was originally found somewhere else online but I found it really useful so reposted it!
If you’re the original author then comment and let us know 🙂

P.S. Thanks 😉


Leave a Reply

Your email address will not be published.

%d bloggers like this: