Pre-formatted text

G

GriffithsJ

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
 
C

Chris Barber

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.

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top