Pre-formatted text

Discussion in 'ASP General' started by GriffithsJ, Feb 3, 2004.

  1. GriffithsJ

    GriffithsJ Guest

    Hi

    I have been given some text that needs to be displayed on a web page. The
    text is pre-formatted (includes things like lists etc) and displays okay if
    I wrap it using the <pre/> tag. However, the font used is rather "naff" and
    looks too different to the rest of my web page.

    I'm not sure how I can (or even whether I can) override the font used with
    the <pre/> tag. If not, is there another tag I can use to display
    pre-formatted text?

    Thanks

    Griff
     
    GriffithsJ, Feb 3, 2004
    #1
    1. Advertising

  2. <pre style='font-family:verdana'>

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "GriffithsJ" <> wrote in message
    news:...
    > Hi
    >
    > I have been given some text that needs to be displayed on a web page. The
    > text is pre-formatted (includes things like lists etc) and displays okay

    if
    > I wrap it using the <pre/> tag. However, the font used is rather "naff"

    and
    > looks too different to the rest of my web page.
    >
    > I'm not sure how I can (or even whether I can) override the font used with
    > the <pre/> tag. If not, is there another tag I can use to display
    > pre-formatted text?
    >
    > Thanks
    >
    > Griff
    >
    >
     
    Aaron Bertrand - MVP, Feb 3, 2004
    #2
    1. Advertising

  3. GriffithsJ

    Chris Barber Guest

    Just apply your own CSS to the <pre> tag.

    <style type="text/css">
    PRE {font-size: 0.9em; color: blue; font-family: Arial}
    </style>

    Place the CSS above the first usage of <pre>.

    Alternatively do a search and replace for CRLF and replace with <br/> and
    then just wrap it all in a <p> element.

    Hope this helps.

    Chris.

    "GriffithsJ" <> wrote in message
    news:...
    Hi

    I have been given some text that needs to be displayed on a web page. The
    text is pre-formatted (includes things like lists etc) and displays okay if
    I wrap it using the <pre/> tag. However, the font used is rather "naff" and
    looks too different to the rest of my web page.

    I'm not sure how I can (or even whether I can) override the font used with
    the <pre/> tag. If not, is there another tag I can use to display
    pre-formatted text?

    Thanks

    Griff
     
    Chris Barber, Feb 3, 2004
    #3
    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. Rocky Moore
    Replies:
    7
    Views:
    1,802
    mikeb
    Jan 14, 2004
  2. =?Utf-8?B?S2V2aW4gQnVydG9u?=

    Pre-Send Request Headers, Pre-Send Request Content

    =?Utf-8?B?S2V2aW4gQnVydG9u?=, Dec 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,127
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  3. Wladimir Borsov
    Replies:
    7
    Views:
    512
    Raymond Loman
    May 5, 2004
  4. John Kotuby
    Replies:
    2
    Views:
    1,639
    John Kotuby
    Jan 28, 2008
  5. David Schwartz

    how to handle pre-formatted text

    David Schwartz, Apr 15, 2008, in forum: XML
    Replies:
    5
    Views:
    586
    Joseph J. Kesselman
    Apr 16, 2008
Loading...

Share This Page