http://www.joahua.com/random/pretest.html
Play around with the web developer's toolbar in Firefox... I can't figure out a way to make it work as you want it to (though it's possible to style it so it doesn't look like preformatted text, demonstrated in the link). If it's coming from a database, isn't it trivial to use a regexp to replace \n with <br />? (Or, doing things properly, wrapping paragraphs in paragraph tags?) It's also possible you could use Javascript to do that kind of stuff, but I'm afraid I'm of no help there. Josh On 10/25/05, 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. > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Street > Sent: Monday, 24 October 2005 6:32 PM > To: wsg@webstandardsgroup.org > Subject: Re: [WSG] specifying width of <pre> > > <code><pre>content</pre></code> > > Gives you an alternate parent element which you can then set to scroll or > whatever, preventing the content from spilling out across your layout > generally. I think. > > On 10/24/05, Andreas Boehmer [Addictive Media] <[EMAIL PROTECTED]> wrote: > > > > Is there any way to specify a max width for content of <pre> tags? > > Currently the content of my <pre> tags does not automatically wrap > > when the parent div is at an end - it just keeps on running until it finds > > the end of the line. > > I know the idea of the <pre> tag is to display the content as it is, > > but of course I want it to remain in the boundaries of my parent element. > > > > Any ideas? > > > -- > Joshua Street > > http://www.joahua.com/ > +61 (0) 425 808 469 > Nnvy jq♞z > > > > ****************************************************** > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ****************************************************** > > -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469