posted 19 years ago
Hi friends,
I get some text from textarea and display it in a table, like :
<table width='100%'>
<tr>
<td width='25%'> </td>
<td width='75%'><%= getMessage() %>
</tr>
</table>
This works fine when the text length is small enough to fit in the screen.
If I receive a lengthy message, with many lines, then I am having trouble displaying it.
Without any tags around the message, all redundant spaces, newlines are ignored.
If I enclose the message with <pre></pre>, the spaces and newlines are preserved, but a lengthy line is displayed in a single line (without wrapping). This makes the presentation ugly; we have to scroll towards right to read the message.
The following css sytles didn't help :
<p style='white-space: pre; width:100%'>
<p style='white-space: pre; text-align: justify'>
How do I display the message properly inside the table?
Any help is appreciated.
Regards,
Balaji
[ January 30, 2003: Message edited by: Jeya Balaji ]