pre {
background: #f7f7f7;
border: 1px solid #f0f0f0;
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+ */
}
5
February
- Written by John Houghton
-
font size
decrease font size
increase font size
- Print E-mail
Read 560 times
Published in
General-kinda
CSS pre tag quirks
The "pre" tag can be pretty quirky. Essentially, I have noticed that the "box's" right side is not managed as expected - it acts as though it's essentially infinite. I added the following tags shown in lines 4-9 and got the behavior that I was expecting.
Last modified on Saturday, 07 August 2010 10:16
John Houghton
John is IT professional with the unusual ability to actually conjugate verbs. Spelling? uh, not so much so. Sense of humor? Sorta.
Website: www.techsolv.cc