Currently, I am working on a page that allows users to post comments. However, I have encountered an issue with the div
element that contains the posted message. When the message is too long and lacks line breaks, a horizontal scrollbar appears. I would like the text to automatically wrap to the next line, similar to the comments on this website.
Do you have any suggestions on how I can achieve this?
I am using Chrome as my browser and ASP.NET as the server language.
This is how I create the div:
Response.Write("<tr><td><div class=""target-div"">" & reader("commento").Replace(vbCrLf,"br/>") & "</div></td></tr>")