Formatting problem

Discussion in 'HTML' started by Dave Saville, Nov 26, 2003.

  1. Dave Saville

    Dave Saville Guest

    I am using a little web mail utility that talks to my private mail
    server.

    Looking at the html template it uses to build the page to read a
    message, I find in a table cell

    <pre wrap> message </pre>

    Now my html book does not say anything about this but the effect is to
    obey line feeds but wrap lines that are very long. I suspect it is an
    old trick. It works in Mozilla but ie6 shows long lines as long lines.
    It is amazing how many email message turn out to be one long line :)

    So the question is how can I change the template to work whatever the
    browser? Remember I can only change the template - I can't run anything
    to wrap the line first so to speak - and it might even be dodgy using a
    style sheet as the template does not have any head/body etc - I have
    not worked out where that comes from yet bit may well be internally
    generated.

    For now I have bodged it to mis use a textarea :)

    TIA

    Regards

    Dave Saville

    NB switch saville for nospam in address
    Dave Saville, Nov 26, 2003
    #1
    1. Advertising

  2. Dave Saville wrote:

    > <pre wrap> message </pre>
    >
    > Now my html book does not say anything about this but the effect is to
    > obey line feeds but wrap lines that are very long. I suspect it is an
    > old trick. It works in Mozilla but ie6 shows long lines as long lines.
    > It is amazing how many email message turn out to be one long line :)


    CSS 2.1 allows you do do:

    <pre style="whitespace: pre-wrap;">...</pre>

    But this isn't supported anywhere yet. Opera 7.x (and possibly 6.x) has
    experimental support in the form of:

    <pre style="whitespace: -o-pre-wrap;">...</pre>

    But I suspect you are after an IE solution.

    Perhaps try using <textarea> with line wrapping on?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Nov 26, 2003
    #2
    1. Advertising

  3. Dave Saville

    Sid Ismail Guest

    On Wed, 26 Nov 2003 21:25:22 +0000 (GMT), "Dave Saville"
    <> wrote:

    : <pre wrap> message </pre>


    "pre wrap" is an oxymoron.

    Sid
    Sid Ismail, Nov 26, 2003
    #3
  4. Dave Saville

    Dave Saville Guest

    On Thu, 27 Nov 2003 01:36:36 +0200, Sid Ismail wrote:

    >On Wed, 26 Nov 2003 21:25:22 +0000 (GMT), "Dave Saville"
    ><> wrote:
    >
    >: <pre wrap> message </pre>
    >
    >
    >"pre wrap" is an oxymoron.


    That's as maybe, but Mozilla will Obey the line feeds and wrap lines
    that otherwise would cause the browser to have a horizontal scroll bar
    - which is what happens in IE.

    Regards

    Dave Saville

    NB switch saville for nospam in address
    Dave Saville, Nov 28, 2003
    #4
  5. Dave Saville

    Dave Saville Guest

    On Wed, 26 Nov 2003 21:44:37 +0000, Toby A Inkster wrote:

    >Dave Saville wrote:
    >
    >> <pre wrap> message </pre>
    >>
    >> Now my html book does not say anything about this but the effect is to
    >> obey line feeds but wrap lines that are very long. I suspect it is an
    >> old trick. It works in Mozilla but ie6 shows long lines as long lines.
    >> It is amazing how many email message turn out to be one long line :)

    >
    >CSS 2.1 allows you do do:
    >
    ><pre style="whitespace: pre-wrap;">...</pre>
    >
    >But this isn't supported anywhere yet. Opera 7.x (and possibly 6.x) has
    >experimental support in the form of:
    >
    ><pre style="whitespace: -o-pre-wrap;">...</pre>
    >
    >But I suspect you are after an IE solution.
    >
    >Perhaps try using <textarea> with line wrapping on?


    That is what I have done. But I wanted a more "correct" solution.

    Regards

    Dave Saville

    NB switch saville for nospam in address
    Dave Saville, Nov 28, 2003
    #5
    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. Kerri

    Date Formatting problem

    Kerri, Aug 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    285
    Kerri
    Aug 20, 2003
  2. Kerri

    Date Formatting problem

    Kerri, Aug 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    285
    Kerri
    Aug 20, 2003
  3. Kerri

    Date Formatting problem

    Kerri, Aug 20, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    358
    Jerry III
    Aug 21, 2003
  4. ald
    Replies:
    0
    Views:
    351
  5. neverstill

    problem formatting URL in script

    neverstill, Dec 9, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    1,052
    mikeb
    Dec 10, 2003
Loading...

Share This Page