white-space:pre; not maintaining breaks.

Discussion in 'HTML' started by Noozer, Oct 6, 2004.

  1. Noozer

    Noozer Guest

    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>
     
    Noozer, Oct 6, 2004
    #1
    1. Advertising

  2. Noozer

    brucie Guest

    brucie, Oct 6, 2004
    #2
    1. Advertising

  3. Noozer

    WebcastMaker Guest

    In article <PsZ8d.9634$a41.3140@pd7tw2no>, 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)
     
    WebcastMaker, Oct 7, 2004
    #3
  4. Noozer

    Noozer Guest

    "WebcastMaker" <> wrote in message
    news:...
    > In article <PsZ8d.9634$a41.3140@pd7tw2no>, 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.
     
    Noozer, Oct 7, 2004
    #4
  5. Noozer

    Noozer Guest

    "brucie" <> wrote in message
    news:uxoc0ethgp26$...
    > 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_email_is_evil_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.
     
    Noozer, Oct 7, 2004
    #5
  6. Noozer

    Mark Parnell Guest

    On Wed, 06 Oct 2004 21:29:19 GMT, Noozer <> 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.html#white-space-prop

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Oct 7, 2004
    #6
  7. Noozer

    brucie Guest

    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
     
    brucie, Oct 7, 2004
    #7
  8. Noozer

    WebcastMaker Guest

    In article <h_09d.630011$M95.337625@pd7tw1no>, 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)
     
    WebcastMaker, Oct 7, 2004
    #8
  9. Noozer

    Noozer Guest

    > > 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.html#white-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!
     
    Noozer, Oct 7, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,913
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,673
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    1,022
    Steve Lamb
    Oct 23, 2003
  4. Ben C
    Replies:
    6
    Views:
    2,165
    Leif K-Brooks
    Jan 28, 2007
  5. Replies:
    2
    Views:
    895
    Jukka K. Korpela
    May 30, 2007
Loading...

Share This Page