I am trying to wrap text in a div. Any way to do that?
Here's the code in question:
<div width="700"><pre><p> " . $texts . "</p></pre></div>
Any clue?
http://www.longren.org/2006/09/27/wrapping-text-inside-pre-tags/
"The long lines are caused by use of the pre html tag. The pre tag preserves spaces and line breaks in a chunk of text. Perfect for displaying snippets of code. However, some lines of code are quite long and will run off the page. This is exactly why my sidebar was getting pushed to the bottom of the page in IE."
To fix:
pre {
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+ */
}