By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,136 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,136 IT Pros & Developers. It's quick & easy.

Pre-formatted text

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<pre style='font-family:verdana'>

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


"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #2

P: n/a
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" <Gr************@hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.