Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > white-space:pre; not maintaining breaks.

Reply
Thread Tools

white-space:pre; not maintaining breaks.

 
 
Noozer
Guest
Posts: n/a
 
      10-06-2004
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>


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      10-06-2004
In alt.html Noozer said:

> I have an ASP page that generates an HTML formatted email message.


HTML e-mail is STILL evil!!!
http://www.georgedillon.com/web/html...il_still.shtml


--
l i t t l e v o i c e s m a k e m e
 
Reply With Quote
 
 
 
 
WebcastMaker
Guest
Posts: n/a
 
      10-07-2004
In article <PsZ8d.9634$a41.3140@pd7tw2no>, http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> 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?

--
WebcastMaker
Webcasting for free
http://www.webentations.com
http://www.webcastmaker.com (CBT)
 
Reply With Quote
 
Noozer
Guest
Posts: n/a
 
      10-07-2004

"WebcastMaker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed).. .
> In article <PsZ8d.9634$a41.3140@pd7tw2no>, (E-Mail Removed) says...
> > 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?


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.


 
Reply With Quote
 
Noozer
Guest
Posts: n/a
 
      10-07-2004

"brucie" <****@usenetshit.info> wrote in message
news:uxoc0ethgp26$(E-Mail Removed)...
> In alt.html Noozer said:
>
> > I have an ASP page that generates an HTML formatted email message.

>
> HTML e-mail is STILL evil!!!
> http://www.georgedillon.com/web/html...il_still.shtml


Ah, but it's a report and it has to be "pretty" for the boss to understand.
They're impressed and I've proven myself "valuable" to keep around.

: )

Only need it to work in MS Outlook, if it can.


 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      10-07-2004
On Wed, 06 Oct 2004 21:29:19 GMT, Noozer <(E-Mail Removed)> declared in
alt.html:

> 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?


Not necessarily poorly:

"Conforming user agents may ignore the 'white-space' property in author
and user style sheets but must specify a value for it in the default
style sheet."
http://www.w3.org/TR/REC-CSS2/text.h...ite-space-prop

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      10-07-2004
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

--
l i t t l e v o i c e s m a k e m e
 
Reply With Quote
 
WebcastMaker
Guest
Posts: n/a
 
      10-07-2004
In article <h_09d.630011$M95.337625@pd7tw1no>, (E-Mail Removed) says...
> > > 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?

> 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.
--
WebcastMaker
Webcasting for free
http://www.webentations.com
http://www.webcastmaker.com (CBT)
 
Reply With Quote
 
Noozer
Guest
Posts: n/a
 
      10-07-2004
> > 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?

>
> Not necessarily poorly:
>
> "Conforming user agents may ignore the 'white-space' property in author
> and user style sheets but must specify a value for it in the default
> style sheet."
> http://www.w3.org/TR/REC-CSS2/text.h...ite-space-prop


Thanks....

Guess I'll modify the code and try the <PRE> tag to see if I have any better
luck.

Muchos gracias y'all!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C Programming 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
Postback not working, pages not maintaining state - I entirely don't get it. Tom wilson ASP .Net 2 02-11-2005 08:13 PM
maintaining control with cookies (not strictly an ASP or even server side question. But not not either) Stephanie Stowe ASP General 2 04-07-2004 04:23 PM



Advertisments