The wonderful pre tag…keeping your words in line

Comments Off    Share on Facebook
ShortLink:

This little booger keeps those run on code sentences, long urls, etc inside the <div> that contains them right where they belong

pre {
white-space: pre;           /* CSS 2.0 */
white-space: pre-wrap;      /* CSS 2.1 */
white-space: pre-line;      /* CSS 3.0 */
white-space: -pre-wrap;     /* Opera 4-6 */
white-space: -o-pre-wrap;   /* Opera 7 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap;  /* HP Printers */
word-wrap: break-word;      /* IE 5+ */

}

Comments are closed.