Textarea Adding Space To Beginning Of Text?
Solution 1:
Try this:
trim(get_film_info('main description'));
Solution 2:
Your text has space at beginning! I don't know what function 'get_film_info' returns but it returns with space!
Solution 3:
There's definitely a space in the beginning and one at the end, as can be seen in the page source. Perhaps get_film_info()
is inadvertently injecting them.
Solution 4:
There is a heading space in the return value of get_form_info(). Check the value of 'main description' in your database (or whereever it is being stored). If there isn't a heading space in the value itself, then get_film_inflo() is to blame.
Solution 5:
A space does exist. Outside of the textarea, the browser does not interpret them, because a \n means nothing (it is interpreted in the source code only) in just regular text form. However, a \n inside a textarea represents a line break and is being interpreted as such.
To solve the problem you can always trim the value before outputting it.
Post a Comment for "Textarea Adding Space To Beginning Of Text?"