| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|Wrapping <pre> text naturally|
I want the carriage returns... but not the nowrap bahaviour
| 12:06 pm on Jun 11, 2003 (gmt 0)|
How's it going?
I need to use the pre tag or an equivalent to get display some text and maintain the line breaks... but the text must also wrap naturally when it hits a specified boundary (width) example:
The following carriage return is displayed..
But this line will force the display much wider then intended because it is so looong...
I'm sure you get the picture. Because we are using XSL call-templates (that use a copy-of) to display the code we cannot just replace a CR with a <br/> - it just can't happen that way unfortunately...
so we need to find a way to deal with it in HTML/CSS and I'm sure one of you guys will have the answer (this needs only work for me in IE5+ BTW)
Thanks in advance y'all
| 12:11 pm on Jun 11, 2003 (gmt 0)|
Sometimes, just visiting WebmasterWorld is enough to set me off in the right direction!
A textarea does almost what I need but for the scrollbars... bingo!
<textarea style="overflow:visible" readonly="readonly">
If anyone has a better (less hacky solution) I'd love to hear it.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved