![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. |
#3
| |||
| |||
|
|
I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. |
#4
| |||
| |||
|
|
Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. |
#5
| |||
| |||
|
|
Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. -- jmm (hyphen) list (at) sohnen-moe (dot) com (Remove .AXSPAMGN for email) |
#6
| |||
| |||
|
|
On 2006-08-13, Jim Moe wrote: Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. There's nothing inconsistent in the OPP's request. He wants the existing linebreaks to remain, and not join with the next line. HE want long lines to wrap. What he wants is very hard to read, and not recommended. |
#7
| |||
| |||
|
|
Chris F.A. Johnson wrote: On 2006-08-13, Jim Moe wrote: Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. There's nothing inconsistent in the OPP's request. He wants the existing linebreaks to remain, and not join with the next line. HE wants long lines to wrap. What he wants is very hard to read, and not recommended. Why would it be hard to read? Will it not justify properly? The way I look at it, if the existing linebreaks remain and the text wraps, it should appear on the browser perfectly. Please let me know if I'm missing something. |
#8
| |||
| |||
|
|
On 2006-08-13, Brent wrote: Chris F.A. Johnson wrote: On 2006-08-13, Jim Moe wrote: Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. There's nothing inconsistent in the OPP's request. He wants the existing linebreaks to remain, and not join with the next line. HE wants long lines to wrap. What he wants is very hard to read, and not recommended. Why would it be hard to read? Will it not justify properly? The way I look at it, if the existing linebreaks remain and the text wraps, it should appear on the browser perfectly. Please let me know if I'm missing something. What you are asking for will give you long lines, followed by short lines that should really be connected to the next line, if the text is going to be readable. The short lines break the flow. You would be better off using style="overflow: auto;". |
#9
| |||
| |||
|
|
I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. I then moved to CSS and the white-space property, but I can't seem to get it to work either. white-space: pre does the same as <pre> and white-space: pre-wrap doesn't seem to be supported by any browsers I've tested with. I tried word-wrap: break-word, but that is only supported my IE and it messed up my white-space: pre anyhow. *sigh* Can anyone suggest to me what properties and values I should use to get the browsers (IE and Firefox, mostly) to preserve whitespace and newlines, as well as wrapping the text. Thank you so much! |
#10
| |||
| |||
|
|
Chris F.A. Johnson wrote: On 2006-08-13, Brent wrote: Chris F.A. Johnson wrote: On 2006-08-13, Jim Moe wrote: Brent wrote: I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pre> tag but that didn't work because it doesn't wrap the text. You want it to preserve the linebreaks and not preserve the linebreaks. I think this is where your difficulty lies. There's nothing inconsistent in the OPP's request. He wants the existing linebreaks to remain, and not join with the next line. HE wants long lines to wrap. What he wants is very hard to read, and not recommended. Why would it be hard to read? Will it not justify properly? The way I look at it, if the existing linebreaks remain and the text wraps, it should appear on the browser perfectly. Please let me know if I'm missing something. What you are asking for will give you long lines, followed by short lines that should really be connected to the next line, if the text is going to be readable. The short lines break the flow. You would be better off using style="overflow: auto;". I tried style="overflow: auto" and still can't get both whitespace preserved and wrapping at once. If I put <pre style="overflow: auto" I get single lined paragraphs that stretch for miles of the right of the browser. If I use <div style="overflow: auto"> I loose whitespace. I still don't understand why you think I will get long lines, followed by short lines. The text has no character returns, except for at the end of each paragraph. Is there really no way to force the text to wrap while preserving whitespace? This is really bumming me out. :-( |
![]() |
| Thread Tools | |
| Display Modes | |
| |