In my form I’m asking users to enter a text and then when they submit the form the text is sent to my database. When I query the entered text and I insert it into my html page it doesn’t fit the container instead if a line has to many words it outputs the line in length. I’d like to know how can I do to crop the line if its size is way too much assuming the size of the container in which it reads. and oh ! to extend my request : what is the best way to treat user input and retrieve it in the exactly same format ??
Share
If you need to “crop” text you can simply use substr.
This will cut your string up to 150 chars
@OP: after reading your question. Did you mean the css ?
Anyway even if you div is set to display:block; it shouldn’t show the horizontal scrollbar
Addendum
The problem with your link is that your div has the class
listingwithyou should change it