white-space:pre; not maintaining breaks.

N

Noozer

I have an ASP page that generates an HTML formatted email message. It works
fine except for one item...

I want to maintain the line breaks, etc for the data that was input into a
text box. The formatting does show up in the email (partial source below)
but the inline CSS styling for white-space isn't being done.

Am I coding it wrong or is it just the email client displaying the results
poorly?

(snip)
<td align='right'>Average Answer:</td><td>1</td></tr><tr>
<td align='right'>National Explanation:</td><td>1</td></tr><tr>
</tr><tr><td height='1' colspan='100%'><hr></td></tr><tr>
<td><span style="font-weight: bold; ">Repair</span></td></tr><tr>
<td align='right'>Staff:</td><td>1</td></tr><tr>
<td align='right'>Explanation:</td><td>1</td></tr><tr>
</tr><tr><td height='8'>&nbsp;</td></tr><tr>
</tr><tr><td height='1' colspan='100%'><hr></td></tr><tr>
</tr></table><table><tr><td align='right'>Comments:</td><td><span
style="white-space: pre; color: #800000; ">This
is
a
test

This is only a test. The quick brown fox jumped over the lazy dogs back.
This is still just a test.</span></td></tr><tr>
</tr></table></body></html>


....I've also had it like this (no SPAN tags)...

</tr></table><table><tr><td align='right'>Comments:</td><td
style="white-space: pre; color: #800000; ">This
is
a
test

This is only a test. The quick brown fox jumped over the lazy dogs back.
This is still just a test.</td></tr><tr>
</tr></table></body></html>
 
W

WebcastMaker

I have an ASP page that generates an HTML formatted email message. It works
fine except for one item...

So what your actually saying is it "doesn't" work fine...

Why would you want to do this when it (like flash eh?) doesn't work on
everyone's machine?
 
N

Noozer

WebcastMaker said:
So what your actually saying is it "doesn't" work fine...

Why would you want to do this when it (like flash eh?) doesn't work on
everyone's machine?

Because it only has to work with one email client and I'm trying to
determine if I made an error understanding the CSS property or if it indeed
doesn't work and I shouldn't do it.
 
B

brucie

In alt.html Noozer said:

Ah, but it's a report and it has to be "pretty" for the boss to understand.

thats why crayons were invented
They're impressed and I've proven myself "valuable" to keep around.

in other words you put out?
Only need it to work in MS Outlook, if it can.

ensure the crayons are non-toxic
 
W

WebcastMaker

Because it only has to work with one email client and I'm trying to
determine if I made an error understanding the CSS property or if it indeed
doesn't work and I shouldn't do it.

It was a rhetorical question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top