Ok, I am putting my users text onto the screen. I need it to represent what they typed so I use the <pre></pre> tags to preserve the hard returns and other white space. The problem comes when they type a long paragraph (such as the one Im typing now) and the pre tags allow the text to stretch the whole website out. I know I can remove the <pre> tags and the text will wrap inside the table cell I place it in, but I need the hard returns and such preserved as I said. Is there an existing algorithm that solves this.
I notice that some sites will add hard returns to the users text to force it to all fit in some desired area. How do I do that.
I am asking in this forum because if I do need a complex algorithm it will need to be php as that is my development environment
Thanks in advance