Is there a way for me to create a limit on max characters per line to a certain table?...or some way to prevent the text to stretch a table cell?

I have a form that users can insert in text. I don't want someone to insert in characters without no space, which will cost the table to stretch and messes up the design.

    You could write a client side script that performs the check and prevents the user from entering more beyond the limit. You could have an additional check server side, but it may be better to use [man]wordwrap/man when displaying the text.

      You could check for words beyond a maximum length:

      if(preg_match('/\S{20,}/' $text))
      {
         // output error
      }
      else
      {
         // no words of 20 non-white-space characters or longer
      }
      
        Write a Reply...