I want to preserve how the text looks in the code. It's a <td>
element, so I styled it like this: td#textarea { white-space: pre; }
It's working in FF. But IE6 is getting rid of the first blank line of
my text. This line is necessary.
<td id="textarea"><-- the text does not start on this line
<-- the text starts here, on this line; so, there is a "\n" at the
beginning
</td>
Do you have any idea of how to fix that?
Randy Webb - 31 May 2007 22:08 GMT
noagbodjivictor@gmail.com said the following on 5/31/2007 2:45 PM:
> I want to preserve how the text looks in the code. It's a <td>
> element, so I styled it like this: td#textarea { white-space: pre; }
[quoted text clipped - 8 lines]
>
> Do you have any idea of how to fix that?
Check the beginning of the string and if it doesn't have a \n then add one.

Signature
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/