Normally I would do that, but in this particular case I was hoping not to
use server-side formatting of the content. But it seems I will have to
revert to that.

I have never had any use for the <pre> tag. Now I thought I finally had my
chance and it turns out to be a really useless tag. DAMN! :)



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Kevin Futter
Sent: Tuesday, 25 October 2005 2:33 PM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] specifying width of <pre>

On 25/10/05 1:59 PM, "Andreas Boehmer [Addictive Media]"
<[EMAIL PROTECTED]> wrote:

> Other than a scroll bar (overflow) there is no solution?
> 
> The reason I need to use <pre> is that the content comes from a 
> database that doesn't use HTML <br>'s, but normal linebreaks. So to 
> format the text correctly I need to put it in <pre> tags, but of 
> course I want it to still fit into the rest of the content.

Can you not use PHP to replace the line breaks with <br /> tags? I use
something like this:

<?php
$br = chr(10); //single line feed character (LF) $description =
str_replace(chr(10), "<br />\n"); // etc ?>

You just need to verify which character your db is using for line breaks
(MySQL?).

Sorry to the list for straying off-topic, and apologies to Andreas (like the
new site mate!) if I'm barking up the wrong tree.

--
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/



******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************





******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to