Wrapping Text Inside Pre Tags
If you use WordPress or just use the <pre> tag to display code on your website you know how it is formatted by default. The text is one long line and can dissappear off the edge of the parent tag.
Well thats no good! so lets add some CSS code to fix that.
How To Wrap
- To do this simply add the following code to your stylesheet
pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* 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+ */
}
If you check my CSS file you can see this code is used on my site to display the previous code box (With a few additions for colour etc.)


Sample Config for WordPress Running on Varnish 2.1
Are you using 32 bit or 64 bit Office 2010?
Have Outlook 2010 Automatically Close a Message After Replying or Forwarding
How to Start Outlook 2010 in a Different Folder
Do you get Error Code 80071392 Using Windows Live Messenger?
How To Image, Sysprep and Deploy Windows 7 a Complete Guide – Using sysprep and Imagex
How to Disable Auto Renewal for Xbox Live
Installing Windows 7 From a USB Stick From Windows XP (Bootable USB) 