OK its part of a large page so I'm extracting elements here for you.
Firstly the form element.
HTML Code:
<textarea name="freetext" rows="5" cols="100"></textarea>
This then goes to my PHP script that handles it as
PHP Code:
$mess .= '<div class="printmultiemailtext"><pre>' . $_POST['freetext'] . '</pre></div>';
basically I'm building a variable image of a page that gets emailed to a client the HTML image is held in $mess
and the CSS that formats the div
Code:
.printmultiemailtext {
width: 100%;
margin: 5px;
text-align: left;
border: 1px solid #ddd;
}
the border was inserted to ensure that I was not wordwraping because the div was ending, its not the div is a full 700px wide.
Ive also tried CSS styling the <pre> tag
Code:
pre {
font-family:Palatino Linotype, sans-serif;
font-size: 13px;
white-space: pre-wrap;
width: 600px;
}
Which effectively changes the font, but does nothing to cure the problem of the wrap
When I enter the text in the textarea
Code:
This is a long line that should not break in the output until it gets to, wait for it, wait for it here. Newline after this.
This is a long line that should not break in the output until it gets to, wait for it, wait for it here. Newline after this.
This is a long line that should not break in the output until it gets to, wait for it, wait for it here. Newline after this.
The results I get are
Code:
This is a
long line that should not break in the output until it gets to,
wait for it, wait for it here. Newline after this.
This is a long line that should not break in the output until it
gets to, wait for it, wait for it here. Newline after this.
This is a long line that should not break in the output until it
gets to, wait for it, wait for it here. Newline after this.
Thanks for any ideas
Bookmarks