Howto: Make A pre Tag Wrap

Here’s how to make a pre tag wrap and have a nice grey background:

pre {font-family: consolas, courier, monospace;
	font-size: 8pt;
  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+ */


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.