I am trying to out put some text collected from a form textarea but it doesn't display well. I am losing the line breaks or not getting word wrap to happen. I lose all the line breaks if i output without any format. If I use <PRE> tags the text goes very wide (no word wrap occurs). The site uses ColdFusion and style sheets and is viewed primarily in IE.
Try something like: pre { white-space: pre-wrap; /* CSS2.1 compliant */ white-space: -moz-pre-wrap; /* Mozilla-based browsers */ white-space: -o-pre-wrap; /* Opera 7+ */ } in your stylesheet and use <pre>, though if you use coldfusion you could just have it insert the <br />'s for you?
Thanks for the CSS, I had tried something with white-space but was unaware of the pre-wrap parameter. You provided more information than the CSS book I own. In the mean time I did find some old ColdFusion code to find carriage return and line feed (chr(13) & chr(10)) replace a <br /> as you said: #Replace(qQuestion.sQuestionText,chr(13) & chr(10),'<br>','ALL')# Code (markup): Thanks.